Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3477)

Unified Diff: build/config/nacl/rules.gni

Issue 1976753002: GN: Build NaCl tests for x64 too on x86 Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't list x86-32 lib dirs when target_cpu==x64 Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/native_client/nacl_test_data.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/nacl/rules.gni
diff --git a/build/config/nacl/rules.gni b/build/config/nacl/rules.gni
index bfc3ec3b8f63642eef20246c26dc5182500a9c74..0d6d03640a3de8586de2fdef6cca10a53d611d7d 100644
--- a/build/config/nacl/rules.gni
+++ b/build/config/nacl/rules.gni
@@ -71,28 +71,48 @@ template("generate_nmf") {
lib_path += "/${lib_prefix}"
}
- # NOTE: There is no explicit dependency for the lib32
- # and lib64 directories created in the product directory.
- # They are created as a side-effect of nmf creation.
+ # Starts empty so the code below can use += everywhere.
+ data = []
+
nmfflags += [ "--library-path=" + rebase_path(root_out_dir) ]
- if (current_cpu == "x86") {
- nmfflags += [ "--library-path=" +
- rebase_path("${nacl_toolchain_tooldir}/lib32") ]
- data = [
- "${lib_path}/lib32/",
- ]
- } else if (current_cpu == "x64") {
+
+ # NOTE: There is no explicit dependency for the lib directory
+ # (lib32 and lib64 for x86/x64) created in the product directory.
+ # They are created as a side-effect of nmf creation.
+ if (current_cpu != "x86" && current_cpu != "x64") {
nmfflags +=
[ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib") ]
- data = [
- "${lib_path}/lib64/",
- ]
+ data += [ "${lib_path}/lib/" ]
} else {
- nmfflags +=
- [ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib") ]
- data = [
- "${lib_path}/lib/",
- ]
+ # For x86-32, the lib/ directory is called lib32/ instead.
+ if (current_cpu == "x86") {
+ nmfflags += [ "--library-path=" +
+ rebase_path("${nacl_toolchain_tooldir}/lib32") ]
+ data += [ "${lib_path}/lib32/" ]
+ }
+
+ # x86-32 Windows needs to build both x86-32 and x86-64 NaCl
+ # binaries into the same nmf covering both architectures. That
+ # gets handled at a higher level (see the nacl_test_data template),
+ # so a single generate_nmf invocation gets both x86-32 and x86-64
+ # nexes listed in executables.
+ if (current_cpu == "x64" || target_os == "win") {
+ # For x86-64, the lib/ directory is called lib64/ instead
+ # when copied by create_nmf.py.
+ glibc_tc = "//build/toolchain/nacl:glibc"
+ assert(current_toolchain == "${glibc_tc}_${current_cpu}")
+ if (current_cpu == "x64") {
+ x64_out_dir = root_out_dir
+ } else {
+ x64_out_dir = get_label_info(":${target_name}(${glibc_tc}_x64)",
+ "root_out_dir")
+ }
+ nmfflags += [
+ "--library-path=" + rebase_path(x64_out_dir),
+ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib"),
+ ]
+ data += [ "${lib_path}/lib64/" ]
+ }
}
}
args = [
« no previous file with comments | « no previous file | ppapi/native_client/nacl_test_data.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698