| Index: build/config/compiler/BUILD.gn
|
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
| index 6a495cc2a82b8b2500a5c7c0c5398b7389c8f0a3..166bc817c6fc77af1def91afbcd28f92cb36038b 100644
|
| --- a/build/config/compiler/BUILD.gn
|
| +++ b/build/config/compiler/BUILD.gn
|
| @@ -165,6 +165,8 @@ config("compiler") {
|
| configs += [ "//build/config/nacl:compiler" ]
|
| } else if (is_ios || is_mac) {
|
| configs += [ "//build/config/mac:compiler" ]
|
| + } else if (current_os == "aix") {
|
| + configs += [ "//build/config/aix:compiler" ]
|
| }
|
|
|
| # See the definitions below.
|
| @@ -178,13 +180,15 @@ config("compiler") {
|
| if (!is_win) {
|
| # Common GCC compiler flags setup.
|
| # --------------------------------
|
| - cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204
|
| - cflags_cc += [
|
| - # Not exporting C++ inline functions can generally be applied anywhere
|
| - # so we do so here. Normal function visibility is controlled by
|
| - # //build/config/gcc:symbol_visibility_hidden.
|
| - "-fvisibility-inlines-hidden",
|
| - ]
|
| + if (!is_power_or_z) {
|
| + cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204
|
| + cflags_cc += [
|
| + # Not exporting C++ inline functions can generally be applied anywhere
|
| + # so we do so here. Normal function visibility is controlled by
|
| + # //build/config/gcc:symbol_visibility_hidden.
|
| + "-fvisibility-inlines-hidden",
|
| + ]
|
| + }
|
|
|
| # Stack protection.
|
| if (is_mac) {
|
| @@ -203,14 +207,16 @@ config("compiler") {
|
| # The x86 toolchain currently has problems with stack-protector.
|
| if (is_android && current_cpu == "x86") {
|
| cflags += [ "-fno-stack-protector" ]
|
| - } else {
|
| + } else if (current_os != "aix") {
|
| + # Not available on aix.
|
| cflags += [ "-fstack-protector" ]
|
| }
|
| }
|
|
|
| # Linker warnings.
|
| if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
|
| - !(is_android && use_order_profiling) && !is_mac && !is_ios) {
|
| + !(is_android && use_order_profiling) && !is_mac && !is_ios &&
|
| + current_os != "aix") {
|
| # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
|
| # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
|
| # crbug.com/485542
|
| @@ -439,7 +445,7 @@ config("compiler") {
|
|
|
| # C++11 compiler flags setup.
|
| # ---------------------------
|
| - if (is_linux || is_android || (is_nacl && is_clang)) {
|
| + if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") {
|
| # gnu++11 instead of c++11 is needed because some code uses typeof() (a
|
| # GNU extension).
|
| # TODO(thakis): Eventually switch this to c++11 instead,
|
| @@ -1151,7 +1157,7 @@ config("chromium_code") {
|
| ]
|
|
|
| if (!is_debug && !using_sanitizer &&
|
| - (!is_linux || !is_clang || is_official_build)) {
|
| + (!is_linux || !is_clang || is_official_build) && !is_power_or_z) {
|
| # _FORTIFY_SOURCE isn't really supported by Clang now, see
|
| # http://llvm.org/bugs/show_bug.cgi?id=16821.
|
| # It seems to work fine with Ubuntu 12 headers though, so use it in
|
| @@ -1371,8 +1377,9 @@ if (is_win) {
|
| # Mac dead code stripping requires symbols.
|
| common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
|
| }
|
| - } else {
|
| + } else if (current_os != "aix") {
|
| # Non-Mac Posix flags.
|
| + # Aix does not support these.
|
|
|
| common_optimize_on_cflags += [
|
| # Don't emit the GCC version ident directives, they just end up in the
|
|
|