[PATCH] D32064: [asan] Disable ASan global-GC depending on the target and compiler flags
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 17 14:36:40 PDT 2017
rnk added a comment.
In https://reviews.llvm.org/D32064#726861, @pcc wrote:
> I think it would be better to move this logic to the driver and have it pass in an `-mllvm` flag. The sanitizer passes should really be taking no arguments in the constructor like the other passes, so I don't want us to add another argument here.
That seems like the opposite of the direction we've been moving, though. cl::opt flags can't appear twice, and this means one process can't do two asan compilations in two LLVMContexts in parallel with different settings.
================
Comment at: lib/Driver/SanitizerArgs.cpp:636
+ case llvm::Triple::COFF:
+ return DataSections;
+ case llvm::Triple::ELF:
----------------
We can return true for COFF here. By adding a comdat during asan instrumentation, we effectively implement -fdata-sections ourselves. If the user really wanted -fno-data-sections for some reason, they're out of luck right now.
Repository:
rL LLVM
https://reviews.llvm.org/D32064
More information about the cfe-commits
mailing list