Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2715)

Unified Diff: build/config/compiler/BUILD.gn

Issue 2815453004: For building v8 using gn on aix_ppc64, linux_s390x and linux_ppc64. (Closed)
Patch Set: clarified the need for host_byteorder.gni Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
brettw 2017/04/26 20:07:42 Why does this condition exist?
Dirk Pranke 2017/04/26 23:32:13 I believe these flags don't work on the IBM versio
rayb 2017/04/27 19:29:45 So for the -fno-strict-aliasing one, I wasn't sure
+ 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

Powered by Google App Engine
This is Rietveld 408576698