summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-01-14 10:46:33 -0800
committerFangrui Song <maskray@google.com>2020-01-14 12:09:13 -0800
commit5d1b3ba687690bbb37f911f66a2c2c5f19d60032 (patch)
tree0b52070f9d5690100bee6418830a15919a4a2a48
parent2d4571bf3060f8f3d8417a0ec55e21a280158069 (diff)
downloadbcm5719-llvm-5d1b3ba687690bbb37f911f66a2c2c5f19d60032.tar.gz
bcm5719-llvm-5d1b3ba687690bbb37f911f66a2c2c5f19d60032.zip
[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
-rw-r--r--clang/include/clang/Driver/Options.td1
-rw-r--r--clang/test/Driver/clang_f_opts.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 71b257094a9..385ddbf5e40 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 970b4e934e7..7038a2b52f6 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 \
OpenPOWER on IntegriCloud