Chromium Code Reviews| Index: build/toolchain/gcc_toolchain.gni |
| diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
| index dfd187954cd148c690223a913eeac524a85e269c..0badd7ea2988cdcbb06542548aa60859819a8d8d 100644 |
| --- a/build/toolchain/gcc_toolchain.gni |
| +++ b/build/toolchain/gcc_toolchain.gni |
| @@ -315,9 +315,17 @@ template("gcc_toolchain") { |
| # This needs a Python script to avoid using simple sh features in this |
| # command, in case the host does not use a POSIX shell (e.g. compiling |
| # 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 a different wrapper and slightly different command for AIX. |
| + ar_wrapper = rebase_path("//build/toolchain/gcc_ar_wrapper_aix.py", |
|
Michael Achenbach
2017/04/18 13:46:04
Maybe pull out the two differences (ar_wrapper, op
rayb
2017/04/25 00:41:04
Done. Also using the same gcc_ar_wrapper.py instea
|
| + root_build_dir) |
| + command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} rcsT @\"$rspfile\"" |
| + } else { |
| + 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\"" |
| + } |
| + |
| description = "AR {{output}}" |
| rspfile_content = "{{inputs}}" |
| outputs = [ |
| @@ -491,9 +499,15 @@ 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" |
| + if (current_os == "aix") { |
| + # the "--start-group .. --end-group" feature isn't available on the aix ld |
| + link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" @\"$rspfile\" {{solibs}} $libs_section_prefix {{libs}} $libs_section_postfix" |
| + } else { |
| + link_command = "$ld {{ldflags}}${extra_ldflags} -o \"$unstripped_outfile\" -Wl,--start-group @\"$rspfile\" {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" |
|
Michael Achenbach
2017/04/18 13:46:04
nit: Readability: Similar to my comment above, may
rayb
2017/04/25 00:41:04
Done.
|
| + } |
| strip_switch = "" |
| + |
| if (defined(invoker.strip)) { |
| strip_switch = " --strip=\"${invoker.strip}\" --unstripped-file=\"$unstripped_outfile\"" |
| } |