[PATCH] D127906: [gn build] Allow use_ubsan=true on mac and unbreak use_asan and use_ubsan

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 16:35:43 PDT 2022


thakis added inline comments.


================
Comment at: llvm/utils/gn/build/toolchain/BUILD.gn:256-257
     current_cpu = "arm64"
+    use_asan = false
+    use_ubsan = false
   }
----------------
pcc wrote:
> pcc wrote:
> > Can we add these lines to the `stage2_unix_toolchain` template instead, as I mentioned in D122862?
> On the other review @phosek mentioned that `use_asan` ought to affect libc++ and so on.
> 
> That seems reasonable enough, but we might need to change the build a bit to make that work.
> 
> Maybe we can move the sanitizer flags into a default config, and have the sanitizers and builtins libraries subtract that from the config?
https://reviews.llvm.org/D122862#3587372 mentions that for libc++, it'd be nice to build with sanitizers enabled.

Which is a good point, but so is yours in https://reviews.llvm.org/D122862#3587325.

I think that means we want to have a stage2_unix_toolchain with sanitizers on and one with sanitizers off, and use the one with sanitizers on for libc++, but the one with sanitizers off for building the sanitizers.

…but that's something I don't want to tackle right now, so I kept this as-is to maintain the status quo from before the baremetal patch for now, and added a FIXME pointing to this comment.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127906/new/

https://reviews.llvm.org/D127906



More information about the llvm-commits mailing list