This patch removes the static ubsan runtime on Apple devices. The motivation
is to reduce the toolchain size.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Overall approach LGTM. I just have some very minor nits.
clang/include/clang/Basic/DiagnosticDriverKinds.td | ||
---|---|---|
219 | Nit: Driver messages start with lowercase. Also please check if "UBSan" is spelt differently in existing driver messages. It might actually be written more explicitly like "undefined behavior sanitizer". | |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
1442–1443 | Maybe add an assert? As the code is constructed right now it should never fail but in the future someone could change the code and break the assumption. if (Sanitize.needsUbsanRt()) { assert(Sanitize.needsSharedRt() && "Static sanitizer runtimes not supported"); AddLinkSanitizerLibArgs(Args, CmdArgs, Sanitize.requiresMinimalRuntime() ? "ubsan_minimal" : "ubsan"); } | |
compiler-rt/lib/ubsan/CMakeLists.txt | ||
118 | I think you may have accidentally added tabs here when re-indenting. |
compiler-rt/lib/ubsan/CMakeLists.txt | ||
---|---|---|
118 | I double checked and these are spaces :/ |
clang/include/clang/Basic/DiagnosticDriverKinds.td | ||
---|---|---|
219 | renamed UBSan to UndefinedBehaviorSanitizer as I see instances of AddressSanitizer and ThreadSanitizer in other messages. Did not find an equivalent for ubsan |
compiler-rt/lib/ubsan/CMakeLists.txt | ||
---|---|---|
118 | Oh my bad. Maybe the >> symbol in phrabricator means indent rather than a particular space/tab choice. |
Nit: Driver messages start with lowercase.
Also please check if "UBSan" is spelt differently in existing driver messages. It might actually be written more explicitly like "undefined behavior sanitizer".