[PATCH] D22663: Support setting default value for -rtlib at build time

Lei Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 06:33:28 PDT 2016


zlei added inline comments.

================
Comment at: CMakeLists.txt:210
@@ -202,3 +209,3 @@
 
 set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING
   "Vendor-specific text for showing with version information.")
----------------
Hahnfeld wrote:
> zlei wrote:
> > I think the original code for resetting `CLANG_DEFAULT_CXX_STDLIB` doesn't work as expected, as beanz pointed out.
> > 
> > In this revision, I just disable invalid values for both `CLANG_DEFAULT_CXX_STDLIB` and `CLANG_DEFAULT_RTLIB`. Users will get a error message when assigning unsupported values to them.
> I tested it this morning and it works as (at least I) expected: It will temporarily reset the value and warn the user that the parameter is not valid.
> 
> I'm against erroring out here because there actually is a sane default value...
I don't have a strong opinion on this, but the problem is the original line `set(CLANG_DEFAULT_CXX_STDLIB "")` doesn't have actual effect (it seems to me).

I'm not sure what you mean by "temporarily reset the value". Last time I tested it, `-DCLANG_DEFAULT_CXX_STDLIB=blah` doesn't reset the value to an empty string (as expected?)

Anyway, I'm fine with either warning or erroring :)


https://reviews.llvm.org/D22663





More information about the cfe-commits mailing list