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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to