EricWF added inline comments. ================ Comment at: src/CMakeLists.txt:37 @@ +36,3 @@ + +remove_flags(-Wl,-z,defs) + ---------------- EricWF wrote: > compnerd wrote: > > EricWF wrote: > > > compnerd wrote: > > > > EricWF wrote: > > > > > compnerd wrote: > > > > > > Do we need to worry about an alternative spelling of `-z defs`? > > > > > Not sure. I only considered the spellings used within the LLVM source > > > > > tree `llvm/cmake/modules/HandleLLVMOptions.cmake`. > > > > This is a change in the original behavior. I think it may be safer to > > > > add the `-z defs` and `-zdefs` spellings as well if you want the no > > > > undefined symbols behavior. At least on solaris, I believe that > > > > `-no-undefined` is also going to cause this to be emitted. > > > > This is a change in the original behavior. > > > > > > Yes it is. libc++abi.so used to resolve the missing _Unwind symbols in > > > libgcc_eh. However I'm hesitant to use `remove_flags` more than we need > > > to because it's really dumb. For example calling > > > `remove_flags(-pedantic)` on "-Wno-pedantic -pedantic-errors -pedantic" > > > will result in the string "-Wno- -errors". For this reason I think its > > > safest to only handle the spelling LLVM uses. > > > > > > Users shouldn't be passing any spelling of "-Wl,-zdefs" to the libc++abi > > > build. I feel like this is one of those instances of "Doctor it hurts > > > when I do this!". > > > > > > Has this swayed your opinion at all? > > It has, only in a slightly different direction. Why not use > > `--allow-shlib-undefined` instead? That way we can insert the flag, which > > would actually mean that we wouldn't need to filter, and by adding it to > > the end, we don't need to worry about the flags from LLVM/users. > That seems fairly reasonable. I didn't think of using > `--allow-shlib-undefined` since that was already the default behavior. > However so long as it actually works it seems like a good solution. After looking at documentation it would appear that `--allow-shlib-undefined` doesn't do what we though.
http://stackoverflow.com/questions/2356168/force-gcc-to-notify-about-undefined-references-in-shared-libraries http://reviews.llvm.org/D15440 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits