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

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 2815453004: For building v8 using gn on aix_ppc64, linux_s390x and linux_ppc64. (Closed)
Patch Set: rebased, addressed reviews, added 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/toolchain/gcc_toolchain.gni
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
index dfd187954cd148c690223a913eeac524a85e269c..a74bce559cd4786b8f9bae375ad5db9f28afce83 100644
--- a/build/toolchain/gcc_toolchain.gni
+++ b/build/toolchain/gcc_toolchain.gni
@@ -317,7 +317,13 @@ template("gcc_toolchain") {
# POSIX-like toolchains such as NaCl on Windows).
ar_wrapper =
rebase_path("//build/toolchain/gcc_ar_wrapper.py", root_build_dir)
- command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} rcsD @\"$rspfile\""
+ if (current_os == "aix") {
+ # We use slightly different arflags for AIX.
+ extra_arflags = "rcsT"
+ } else {
+ extra_arflags = "rcsD"
+ }
+ command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} $extra_arflags @\"$rspfile\""
description = "AR {{output}}"
rspfile_content = "{{inputs}}"
outputs = [
@@ -491,9 +497,17 @@ template("gcc_toolchain") {
map_switch = " --map-file \"$map_file\""
}
- link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" -Wl,--start-group @\"$rspfile\" {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"
+ start_group_flag = " "
Michael Achenbach 2017/04/25 14:08:30 nit: Why not empty string?
rayb 2017/04/25 17:28:49 That was a mistake. Fixed it.
+ end_group_flag = " "
+ if (current_os != "aix") {
+ # the "--start-group .. --end-group" feature isn't available on the aix ld.
+ start_group_flag = "-Wl,--start-group"
+ end_group_flag = "-Wl,--end-group "
+ }
+ link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" $start_group_flag @\"$rspfile\" {{solibs}} $end_group_flag $libs_section_prefix {{libs}} $libs_section_postfix"
strip_switch = ""
+
if (defined(invoker.strip)) {
strip_switch = " --strip=\"${invoker.strip}\" --unstripped-file=\"$unstripped_outfile\""
}

Powered by Google App Engine
This is Rietveld 408576698