Index: build/toolchain/nacl/BUILD.gn |
diff --git a/build/toolchain/nacl/BUILD.gn b/build/toolchain/nacl/BUILD.gn |
index a159118c0a028a42cdfa41f416cfeaf3890bc3b5..f36fba98afc5e69f33634caa0909febaacee0858 100644 |
--- a/build/toolchain/nacl/BUILD.gn |
+++ b/build/toolchain/nacl/BUILD.gn |
@@ -24,7 +24,7 @@ nacl_x86_glibc_rev = revisions[0] |
nacl_arm_glibc_rev = revisions[1] |
# TODO(mcgrathr): Uncomment this when |
-# https://code.google.com/p/chromium/issues/detail?id=555724 is fixed. |
+# https://code.google.com/p/chromium/issues/detail?id=395883 is fixed. |
#pnacl_newlib_rev = revisions[2] |
template("pnacl_toolchain") { |
@@ -48,6 +48,8 @@ template("pnacl_toolchain") { |
cxx = toolprefix + "clang++" |
ar = toolprefix + "ar" |
ld = cxx |
+ readelf = toolprefix + "readelf" |
+ nm = toolprefix + "nm" |
strip = toolprefix + invoker.strip |
executable_extension = invoker.executable_extension |
} |
@@ -87,14 +89,25 @@ template("nacl_glibc_toolchain") { |
invoker.toolchain_tuple + "-", |
root_build_dir) |
+ # TODO(mcgrathr): Hoist this to top level when |
+ # https://code.google.com/p/chromium/issues/detail?id=395883 is fixed. |
+ if (host_os == "win") { |
+ toolsuffix = ".exe" |
+ } else { |
+ toolsuffix = "" |
+ } |
+ |
nacl_toolchain("glibc_" + toolchain_cpu) { |
is_clang = false |
is_nacl_glibc = true |
- cc = toolprefix + "gcc" |
- cxx = toolprefix + "g++" |
- ar = toolprefix + "ar" |
+ cc = toolprefix + "gcc" + toolsuffix |
+ cxx = toolprefix + "g++" + toolsuffix |
+ ar = toolprefix + "ar" + toolsuffix |
ld = cxx |
+ readelf = toolprefix + "readelf" + toolsuffix |
+ nm = toolprefix + "nm" + toolsuffix |
+ strip = toolprefix + "strip" + toolsuffix |
} |
} |
@@ -129,12 +142,23 @@ template("nacl_clang_toolchain") { |
invoker.toolchain_tuple + "-", |
root_build_dir) |
+ # TODO(mcgrathr): Hoist this to top level when |
+ # https://code.google.com/p/chromium/issues/detail?id=395883 is fixed. |
+ if (host_os == "win") { |
+ toolsuffix = ".exe" |
+ } else { |
+ toolsuffix = "" |
+ } |
+ |
nacl_toolchain("clang_newlib_" + toolchain_cpu) { |
is_clang = true |
- cc = toolprefix + "clang" |
- cxx = toolprefix + "clang++" |
- ar = toolprefix + "ar" |
+ cc = toolprefix + "clang" + toolsuffix |
+ cxx = toolprefix + "clang++" + toolsuffix |
+ ar = toolprefix + "ar" + toolsuffix |
ld = cxx |
+ readelf = toolprefix + "readelf" + toolsuffix |
+ nm = toolprefix + "nm" + toolsuffix |
+ strip = toolprefix + "strip" + toolsuffix |
} |
} |
@@ -151,6 +175,14 @@ template("nacl_irt_toolchain") { |
invoker.toolchain_tuple + "-", |
root_build_dir) |
+ # TODO(mcgrathr): Hoist this to top level when |
+ # https://code.google.com/p/chromium/issues/detail?id=395883 is fixed. |
+ if (host_os == "win") { |
+ toolsuffix = ".exe" |
+ } else { |
+ toolsuffix = "" |
+ } |
+ |
link_irt = rebase_path("//native_client/build/link_irt.py", root_build_dir) |
tls_edit_label = |
@@ -162,11 +194,12 @@ template("nacl_irt_toolchain") { |
nacl_toolchain("irt_" + toolchain_cpu) { |
is_clang = true |
- cc = toolprefix + "clang" |
- cxx = toolprefix + "clang++" |
- ar = toolprefix + "ar" |
- readelf = toolprefix + "readelf" |
- strip = toolprefix + "strip" |
+ cc = toolprefix + "clang" + toolsuffix |
+ cxx = toolprefix + "clang++" + toolsuffix |
+ ar = toolprefix + "ar" + toolsuffix |
+ readelf = toolprefix + "readelf" + toolsuffix |
+ nm = toolprefix + "nm" + toolsuffix |
+ strip = toolprefix + "strip" + toolsuffix |
# Always build the IRT with full debugging symbols, regardless of |
# how Chromium itself is being built (or other NaCl executables). |