diff options
| author | Filipe Cabecinhas <me@filcab.net> | 2016-05-12 16:51:36 +0000 |
|---|---|---|
| committer | Filipe Cabecinhas <me@filcab.net> | 2016-05-12 16:51:36 +0000 |
| commit | ab731f7e86c052c9ebec3a2acaca7a500caec1c0 (patch) | |
| tree | 1930bdf4cb30cb191932bd35a65200e52340b118 /clang/lib/Driver/Tools.cpp | |
| parent | b61f01d0a5fcbc83341acadcbe1f77cac28f3ca2 (diff) | |
| download | bcm5719-llvm-ab731f7e86c052c9ebec3a2acaca7a500caec1c0.tar.gz bcm5719-llvm-ab731f7e86c052c9ebec3a2acaca7a500caec1c0.zip | |
[ubsan] Add -fsanitize-undefined-strip-path-components=N
Summary:
This option allows the user to control how much of the file name is
emitted by UBSan. Tuning this option allows one to save space in the
resulting binary, which is helpful for restricted execution
environments.
With a positive N, UBSan skips the first N path components.
With a negative N, UBSan only keeps the last N path components.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19666
llvm-svn: 269309
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 98c0d1deebc..5da1fd6c969 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -5607,6 +5607,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Arg *A = Args.getLastArg(options::OPT_fshow_overloads_EQ)) A->render(Args, CmdArgs); + if (Arg *A = Args.getLastArg( + options::OPT_fsanitize_undefined_strip_path_components_EQ)) + A->render(Args, CmdArgs); + // -fdollars-in-identifiers default varies depending on platform and // language; only pass if specified. if (Arg *A = Args.getLastArg(options::OPT_fdollars_in_identifiers, |

