[PATCH] D56627: gn build: Split no-RTTI flag into a config.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 18:47:29 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL351155: gn build: Split no-RTTI flag into a config. (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56627?vs=181405&id=181698#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56627/new/
https://reviews.llvm.org/D56627
Files:
llvm/trunk/utils/gn/build/BUILD.gn
llvm/trunk/utils/gn/build/BUILDCONFIG.gn
Index: llvm/trunk/utils/gn/build/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/build/BUILD.gn
+++ llvm/trunk/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",
Index: llvm/trunk/utils/gn/build/BUILDCONFIG.gn
===================================================================
--- llvm/trunk/utils/gn/build/BUILDCONFIG.gn
+++ llvm/trunk/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",
]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56627.181698.patch
Type: text/x-patch
Size: 1272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190115/77dee801/attachment.bin>
More information about the llvm-commits
mailing list