Chromium Code Reviews| Index: build/config/BUILDCONFIG.gn |
| diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn |
| index d055e705627c96782434537d0157594ff4f6dad0..1bbdb5f766d69ea1ecf3214f523933bb822fb1e1 100644 |
| --- a/build/config/BUILDCONFIG.gn |
| +++ b/build/config/BUILDCONFIG.gn |
| @@ -69,6 +69,22 @@ if (current_os == "") { |
| current_os = target_os |
| } |
| +# Detect host byteorder |
| +# ppc64 can be either BE or LE |
| +if (host_cpu == "ppc64") { |
| + if (current_os == "aix") { |
| + host_byteorder = "big" |
| + } else { |
| + # Only use the script when absolutely necessary |
| + host_byteorder = exec_script("//build/get_byteorder.py", [], "trim string") |
|
Dirk Pranke
2017/04/14 01:32:38
Maybe we should make host_byteorder a built in var
Dirk Pranke
2017/04/18 20:31:31
I've changed my mind. To repeat my latest comment
rayb
2017/04/25 00:41:03
using host_byteorder.gni now.
|
| + } |
| +} else if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" || |
| + host_cpu == "mips" || host_cpu == "mips64") { |
| + host_byteorder = "big" |
| +} else { |
| + host_byteorder = "little" |
| +} |
| + |
| # ============================================================================= |
| # BUILD FLAGS |
| # ============================================================================= |
| @@ -136,7 +152,10 @@ declare_args() { |
| # Set to true when compiling with the Clang compiler. Typically this is used |
| # to configure warnings. |
| is_clang = current_os == "mac" || current_os == "ios" || |
| - current_os == "linux" || current_os == "chromeos" |
| + (current_os == "linux" && |
| + (current_cpu != "s390x" && current_cpu != "s390" && |
| + current_cpu != "ppc64" && current_cpu != "ppc")) || |
| + current_os == "chromeos" |
|
Michael Achenbach
2017/04/18 13:46:03
nit: Maybe move the chromeos clause before the lin
rayb
2017/04/25 00:41:03
Done.
|
| # Allows the path to a custom target toolchain to be injected as a single |
| # argument, and set as the default toolchain. |
| @@ -207,6 +226,8 @@ if (host_toolchain == "") { |
| } else { |
| host_toolchain = "//build/toolchain/win:$target_cpu" |
| } |
| + } else if (host_os == "aix") { |
| + host_toolchain = "//build/toolchain/aix:$host_cpu" |
| } else { |
| assert(false, "Unsupported host_os: $host_os") |
| } |
| @@ -242,6 +263,8 @@ if (target_os == "android") { |
| } else { |
| _default_toolchain = "//build/toolchain/win:$target_cpu" |
| } |
| +} else if (target_os == "aix") { |
| + _default_toolchain = "//build/toolchain/aix:$target_cpu" |
| } else if (target_os == "winrt_81" || target_os == "winrt_81_phone" || |
| target_os == "winrt_10") { |
| _default_toolchain = "//build/toolchain/win:winrt_$target_cpu" |
| @@ -342,6 +365,15 @@ if (current_os == "win" || current_os == "winrt_81" || |
| is_nacl = false |
| is_posix = true |
| is_win = false |
| +} else if (current_os == "aix") { |
| + is_android = false |
| + is_chromeos = false |
| + is_ios = false |
| + is_linux = false |
| + is_mac = false |
| + is_nacl = false |
| + is_posix = true |
| + is_win = false |
| } |
| # ============================================================================= |
| @@ -370,6 +402,7 @@ if (!is_posix) { |
| "*\bposix/*", |
| ] |
| } |
| + |
| if (!is_win) { |
| sources_assignment_filter += [ |
| "*_win.cc", |
| @@ -498,11 +531,13 @@ if (current_os == "winrt_81" || current_os == "winrt_81_phone" || |
| current_os == "winrt_10") { |
| default_compiler_configs += [ "//build/config/win:target_winrt" ] |
| } |
| + |
| if (is_posix) { |
| - default_compiler_configs += [ |
| - "//build/config/gcc:no_exceptions", |
| - "//build/config/gcc:symbol_visibility_hidden", |
| - ] |
| + default_compiler_configs += [ "//build/config/gcc:no_exceptions" ] |
| + if (current_os != "aix") { |
| + default_compiler_configs += |
| + [ "//build/config/gcc:symbol_visibility_hidden" ] |
| + } |
| } |
| if (is_android) { |