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..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\"" |
| } |