[clang] 5d1b3ba - [Driver] Ignore -fno-semantic-interposition
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 14 12:09:28 PST 2020
Author: Fangrui Song
Date: 2020-01-14T12:09:13-08:00
New Revision: 5d1b3ba687690bbb37f911f66a2c2c5f19d60032
URL: https://github.com/llvm/llvm-project/commit/5d1b3ba687690bbb37f911f66a2c2c5f19d60032
DIFF: https://github.com/llvm/llvm-project/commit/5d1b3ba687690bbb37f911f66a2c2c5f19d60032.diff
LOG: [Driver] Ignore -fno-semantic-interposition
Fedora wants to build projects with -fno-semantic-interposition (e.g.
https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup),
which is supported by GCC>=5.
Clang's current behavior is similar to -fno-semantic-interposition and
the end goal is to make it more so
(https://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html).
Ignore this option.
We should let users know -fsemantic-interposition is not currently
supported, so it should remain a hard error.
Reviewed By: serge-sans-paille
Differential Revision: https://reviews.llvm.org/D72724
Added:
Modified:
clang/include/clang/Driver/Options.td
clang/test/Driver/clang_f_opts.c
Removed:
################################################################################
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 71b257094a98..385ddbf5e40d 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3258,6 +3258,7 @@ defm inline_small_functions : BooleanFFlag<"inline-small-functions">,
defm ipa_cp : BooleanFFlag<"ipa-cp">,
Group<clang_ignored_gcc_optimization_f_Group>;
defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>;
+def : Flag<["-"], "fno-semantic-interposition">, Group<clang_ignored_f_Group>;
defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index 970b4e934e78..7038a2b52f66 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -251,6 +251,7 @@
// RUN: -fexec-charset=UTF-8 \
// RUN: -fivopts -fno-ivopts \
// RUN: -fnon-call-exceptions -fno-non-call-exceptions \
+// RUN: -fno-semantic-interposition \
// RUN: -fpermissive -fno-permissive \
// RUN: -fdefer-pop -fno-defer-pop \
// RUN: -fprefetch-loop-arrays -fno-prefetch-loop-arrays \
More information about the cfe-commits
mailing list