diff options
author | cpeyser <cpeyser@google.com> | 2017-10-20 23:15:10 +0200 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2017-10-23 17:16:15 +0200 |
commit | e9b10399f6a148a3d20442f2c5020b05fa891873 (patch) | |
tree | 4786a279489517fcfa7c8e4ce9e7e405415254ec /tools/osx | |
parent | 539b22b15c0114402e52151f63a2c83c95010244 (diff) |
Move hard-coded compilation-mode-specific flags in ObjcConfiguration.
PiperOrigin-RevId: 172932367
Diffstat (limited to 'tools/osx')
-rw-r--r-- | tools/osx/crosstool/CROSSTOOL.tpl | 240 |
1 files changed, 240 insertions, 0 deletions
diff --git a/tools/osx/crosstool/CROSSTOOL.tpl b/tools/osx/crosstool/CROSSTOOL.tpl index 9ec9547123..954a54fb34 100644 --- a/tools/osx/crosstool/CROSSTOOL.tpl +++ b/tools/osx/crosstool/CROSSTOOL.tpl @@ -136,10 +136,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } linking_mode_flags { mode: DYNAMIC @@ -173,6 +180,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -1785,10 +1809,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -1819,6 +1850,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -3447,10 +3495,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -3481,6 +3536,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -5111,11 +5183,18 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" compiler_flag: "-DNS_BLOCK_ASSERTIONS=1" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -5146,6 +5225,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -6804,10 +6900,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -6838,6 +6941,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -8466,10 +8586,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -8500,6 +8627,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -10116,10 +10260,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -10150,6 +10301,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -11768,11 +11936,18 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" compiler_flag: "-DNS_BLOCK_ASSERTIONS=1" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -11803,6 +11978,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -13449,10 +13641,17 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -13483,6 +13682,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { @@ -15098,11 +15314,18 @@ toolchain { compiler_flag: "-DNDEBUG" compiler_flag: "-ffunction-sections" compiler_flag: "-fdata-sections" + compiler_flag: "-Wno-unused-variable" + compiler_flag: "-Winit-self" + compiler_flag: "-Wno-extra" compiler_flag: "-DNS_BLOCK_ASSERTIONS=1" } compilation_mode_flags { mode: DBG compiler_flag: "-g" + compiler_flag: "-DDEBUG" + compiler_flag: "-O0" + compiler_flag: "-fstack-protector" + compiler_flag: "-fstack-protector-all" } make_variable { name: "STACK_FRAME_UNLIMITED" @@ -15136,6 +15359,23 @@ toolchain { name: "dbg" } feature { + name: "use_glibcxx_dbg_opts" + flag_set { + action: "c-compile" + action: "c++-compile" + action: "objc-compile" + action: "objc++-compile" + flag_group { + flag: "-D_GLIBCXX_DEBUG" + flag: "-D_GLIBCXX_DEBUG_PEDANTIC" + flag: "-D_GLIBCPP_CONCEPT_CHECKS" + } + } + requires { + feature: "dbg" + } + } + feature { name: "compile_all_modules" } feature { |