This revision was automatically updated to reflect the committed changes.
Closed by commit rL315015: Cleanup and generalize -shared-libasan. (authored by
eugenis).
Changed prior to commit:
https://reviews.llvm.org/D38525?vs=117875&id=117878#toc
Repository:
rL LLVM
https://reviews.llvm.org/D
eugenis added inline comments.
Comment at: clang/lib/Driver/SanitizerArgs.cpp:614
+ if (Arg *A = Args.getLastArg(options::OPT_shared_libsan,
+ options::OPT_static_libsan))
+SharedRuntime = A->getOption().matches(options::OPT_shared_libsan);
eugenis updated this revision to Diff 117875.
eugenis added a comment.
address comment
https://reviews.llvm.org/D38525
Files:
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/SanitizerArgs.h
clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
eugenis added inline comments.
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:563
+if (SanArgs.needsUbsanRt()) {
+ if (SanArgs.requiresMinimalRuntime()) {
+SharedRuntimes.push_back("ubsan_minimal");
vitalybuka wrote:
> Shouldn't ubsan cha
vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Driver/SanitizerArgs.cpp:614
+ if (Arg *A = Args.getLastArg(options::OPT_shared_libsan,
+ options::OPT_static
eugenis updated this revision to Diff 117767.
eugenis added a comment.
renamed flags to *-libsan
https://reviews.llvm.org/D38525
Files:
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/SanitizerArgs.h
clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Driver/ToolChains/CommonA
vitalybuka added a comment.
In https://reviews.llvm.org/D38525#26, @rsmith wrote:
> Could we perhaps rename these flags to e.g. `-static-libsan` (with a
> `-static-libasan` alias for compatibility)? It seems confusing that the way
> to enable a static tsan runtime would be with `-static-lib
rsmith added a comment.
Could we perhaps rename these flags to e.g. `-static-libsan` (with a
`-static-libasan` alias for compatibility)? It seems confusing that the way to
enable a static tsan runtime would be with `-static-libasan`.
https://reviews.llvm.org/D38525
_
eugenis created this revision.
Herald added a subscriber: srhines.
- Add -static-libasan for targets that default to shared.
- Remove an Android special case. It is now possible (but untested) to use
static compiler-rt libraries there.
- Support libclang_rt.ubsan_standalone as a shared library.