poac icon indicating copy to clipboard operation
poac copied to clipboard

How to specify -stdlib when using clang++

Open watiko opened this issue 9 months ago • 1 comments

It is possible to specify -stdlib by writing the following in poac.toml, but it will not work when CXX=g++.

[profile]
cxxflags = ["-stdlib=libc++"]

I felt it would be useful if there was a way to make it work for both CXX=clang++ and CXX=g++. I'm not sure what the best way is, but I wrote notes of what I came up with.

  • Add CXXFLAGS environment variable (similar to RUSTFLAGS)
  • Allow CXX to be fixed in poac.toml (profile.cxx?) to avoid confusion if only one cxx is assumed.

watiko avatar May 13 '24 18:05 watiko