diff options
author | mcgrathr <mcgrathr@chromium.org> | 2015-11-09 14:28:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-09 22:29:36 +0000 |
commit | 46f8e4a291285770abb2357402fe8e662e00df2e (patch) | |
tree | 724ec1ecab818ff505f45dbd93b23a426d84df27 /remoting | |
parent | aa0d38670f55033607bc4d2513f877db516a4b1c (diff) | |
download | chromium_src-46f8e4a291285770abb2357402fe8e662e00df2e.zip chromium_src-46f8e4a291285770abb2357402fe8e662e00df2e.tar.gz chromium_src-46f8e4a291285770abb2357402fe8e662e00df2e.tar.bz2 |
GN: Avoid nontrivial shell commands in gcc_toolchain tool("link")
The gcc_toolchain template is used for NaCl toolchains on every host
OS, as well as for the native toolchains on a POSIXy OS. When the
host is not POSIXy, the toolchain commands cannot use sh syntax (not
even '&&'). The "link" tool does more than a simple command when
'strip' or 'postlink' variables are set, and used POSIX sh syntax to
in these cases. To make this tool portable, make it use a Python
script instead of those complex shell command lines. The 'postlink'
variable was used only for the pnacl toolchain's "finalize" step and
it can just as well use the 'strip' variable for that purpose, so
simplify things by eliminating 'postlink' entirely.
BUG= 512869
R=dpranke@chromium.org, dschuff@chromium.org
Review URL: https://codereview.chromium.org/1432603003
Cr-Commit-Position: refs/heads/master@{#358684}
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/client/plugin/BUILD.gn | 15 | ||||
-rw-r--r-- | remoting/webapp/build_template.gni | 11 |
2 files changed, 22 insertions, 4 deletions
diff --git a/remoting/client/plugin/BUILD.gn b/remoting/client/plugin/BUILD.gn index 9f3d8ce..01432fd 100644 --- a/remoting/client/plugin/BUILD.gn +++ b/remoting/client/plugin/BUILD.gn @@ -5,6 +5,7 @@ assert(is_nacl, "These targets must only be built using the untrusted NaCl toolchains.") +import("//build/config/features.gni") import("//remoting/remoting_srcs.gni") config("enable_linker_optimization") { @@ -40,3 +41,17 @@ executable("remoting_client_plugin_newlib") { include_dirs = [ "//ppapi/lib/gl/include" ] } + +if (enable_pnacl && is_debug) { + copy("remoting_client_plugin_newlib_debug") { + public_deps = [ + ":remoting_client_plugin_newlib", + ] + sources = [ + "$root_out_dir/exe.unstripped/remoting_client_plugin_newlib.pexe", + ] + outputs = [ + "$root_out_dir/remoting_client_plugin_newlib.pexe.debug", + ] + } +} diff --git a/remoting/webapp/build_template.gni b/remoting/webapp/build_template.gni index 3b8d9509..370a143 100644 --- a/remoting/webapp/build_template.gni +++ b/remoting/webapp/build_template.gni @@ -197,9 +197,9 @@ template("desktop_remoting_webapp") { ] if (enable_pnacl) { - pexe_dir = get_label_info( - "//remoting/client/plugin:remoting_client_plugin_newlib(//build/toolchain/nacl:newlib_pnacl)", - "root_out_dir") + pnacl_tc = "//build/toolchain/nacl:newlib_pnacl" + pexe_label = "//remoting/client/plugin:remoting_client_plugin_newlib" + pexe_dir = get_label_info("${pexe_label}($pnacl_tc)", "root_out_dir") extra_files += [ "$pexe_dir/remoting_client_plugin_newlib.pexe" ] if (is_debug) { @@ -228,7 +228,10 @@ template("desktop_remoting_webapp") { ] if (enable_pnacl) { - deps += [ "//remoting/client/plugin:remoting_client_plugin_newlib(//build/toolchain/nacl:newlib_pnacl)" ] + deps += [ "${pexe_label}($pnacl_tc)" ] + if (is_debug) { + deps += [ "${pexe_label}_debug($pnacl_tc)" ] + } } # Create a file that contains a list of all the resource files needed |