[PATCH] D56627: gn build: Split no-RTTI flag into a config.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 17:37:36 PST 2019
pcc created this revision.
pcc added reviewers: thakis, phosek.
Some of the sanitizer runtime code needs to be built with RTTI;
this allows that code to opt in to RTTI.
Repository:
rL LLVM
https://reviews.llvm.org/D56627
Files:
llvm/utils/gn/build/BUILD.gn
llvm/utils/gn/build/BUILDCONFIG.gn
Index: llvm/utils/gn/build/BUILDCONFIG.gn
===================================================================
--- llvm/utils/gn/build/BUILDCONFIG.gn
+++ llvm/utils/gn/build/BUILDCONFIG.gn
@@ -5,6 +5,7 @@
shared_binary_target_configs = [
"//llvm/utils/gn/build:compiler_defaults",
"//llvm/utils/gn/build:llvm_code",
+ "//llvm/utils/gn/build:no_rtti",
"//llvm/utils/gn/build:warn_covered_switch_default",
]
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -28,7 +28,6 @@
cflags_cc = [
"-std=c++11",
"-fno-exceptions",
- "-fno-rtti",
"-fvisibility-inlines-hidden",
]
} else {
@@ -52,10 +51,7 @@
"_UNICODE",
"UNICODE",
]
- cflags += [
- "/EHs-c-",
- "/GR-",
- ]
+ cflags += [ "/EHs-c-" ]
# The MSVC default value (1 MB) is not enough for parsing recursive C++
# templates in Clang.
@@ -110,6 +106,14 @@
}
}
+config("no_rtti") {
+ if (current_os == "win") {
+ cflags_cc = [ "/GR-" ]
+ } else {
+ cflags_cc = [ "-fno-rtti" ]
+ }
+}
+
config("llvm_code") {
include_dirs = [
"//llvm/include",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56627.181405.patch
Type: text/x-patch
Size: 1236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190112/0078392e/attachment.bin>
More information about the llvm-commits
mailing list