diff options
author | mcgrathr <mcgrathr@chromium.org> | 2015-10-27 11:11:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-27 18:12:26 +0000 |
commit | 7a379aa7f9ff6fe49bd441869887c7b517a1a0a0 (patch) | |
tree | 52c8de59a10316d96af7eb83aa4a9b285b5a63b8 /build | |
parent | 8911f4e9580ef8a1ed15cb87c7274184ac831d90 (diff) | |
download | chromium_src-7a379aa7f9ff6fe49bd441869887c7b517a1a0a0.zip chromium_src-7a379aa7f9ff6fe49bd441869887c7b517a1a0a0.tar.gz chromium_src-7a379aa7f9ff6fe49bd441869887c7b517a1a0a0.tar.bz2 |
GN: Strip NaCl IRT and save its .debug file
With a simple tweak, the toolchain already knows how to strip the
nexe and leave the unstripped nexe where it can be found. After
that, the unstripped nexe can just be copied as the .debug file and
a single objcopy command suffices to annotate the stripped file with
a pointer to the .debug file.
Also factor out computations about toolchain directory names into
//build/config/nacl/config.gni where they can be reused.
BUG= 546352
R=bbudge@chromium.org, dpranke@chromium.org
Review URL: https://codereview.chromium.org/1415293005
Cr-Commit-Position: refs/heads/master@{#356340}
Diffstat (limited to 'build')
-rw-r--r-- | build/config/nacl/config.gni | 23 | ||||
-rw-r--r-- | build/toolchain/nacl/BUILD.gn | 1 | ||||
-rw-r--r-- | build/toolchain/nacl_toolchain.gni | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/build/config/nacl/config.gni b/build/config/nacl/config.gni index 895cde4..14a6d3d 100644 --- a/build/config/nacl/config.gni +++ b/build/config/nacl/config.gni @@ -11,6 +11,29 @@ declare_args() { nacl_toolchain_dir = "//native_client/toolchain/${host_os}_x86" +if (is_nacl_glibc) { + if (current_cpu == "x86" || current_cpu == "x64") { + nacl_toolchain_package = "nacl_x86_glibc" + } else if (current_cpu == "arm") { + nacl_toolchain_package = "nacl_arm_glibc" + } +} else { + nacl_toolchain_package = "pnacl_newlib" +} + +if (current_cpu == "pnacl") { + nacl_tuple = "pnacl" +} else if (current_cpu == "x86" || current_cpu == "x64") { + nacl_tuple = "x86_64-nacl" +} else if (current_cpu == "arm") { + nacl_tuple = "arm-nacl" +} + +nacl_toolchain_bindir = "${nacl_toolchain_dir}/${nacl_toolchain_package}/bin" +nacl_toolchain_tooldir = + "${nacl_toolchain_dir}/${nacl_toolchain_package}/${nacl_tuple}" +nacl_toolprefix = "${nacl_toolchain_bindir}/${nacl_tuple}-" + nacl_irt_toolchain = "//build/toolchain/nacl:irt_" + target_cpu is_nacl_irt = current_toolchain == nacl_irt_toolchain diff --git a/build/toolchain/nacl/BUILD.gn b/build/toolchain/nacl/BUILD.gn index d5e8316..bf31e84 100644 --- a/build/toolchain/nacl/BUILD.gn +++ b/build/toolchain/nacl/BUILD.gn @@ -151,6 +151,7 @@ template("nacl_irt_toolchain") { cxx = toolprefix + "clang++" ar = toolprefix + "ar" readelf = toolprefix + "readelf" + strip = toolprefix + "strip" # Always build the IRT with full debugging symbols, regardless of # how Chromium itself is being built (or other NaCl executables). diff --git a/build/toolchain/nacl_toolchain.gni b/build/toolchain/nacl_toolchain.gni index faca9d5..576fed9 100644 --- a/build/toolchain/nacl_toolchain.gni +++ b/build/toolchain/nacl_toolchain.gni @@ -44,6 +44,7 @@ template("nacl_toolchain") { "link_outputs", "postlink", "symbol_level", + "strip", "toolchain_cpu", ]) |