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

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: 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') | ppapi/native_client/nacl_test_data.gni » ('J')
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..e28343f81aee0b791ee9e6670d43cee36d518cb9 100644
--- a/build/config/nacl/rules.gni
+++ b/build/config/nacl/rules.gni
@@ -71,25 +71,35 @@ template("generate_nmf") {
lib_path += "/${lib_prefix}"
}
- # NOTE: There is no explicit dependency for the lib32
- # and lib64 directories created in the product directory.
+ # 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.
- 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/",
+ if (current_cpu == "x86" || current_cpu == "x64") {
+ # For x86, include both x86-32 and x86-64 library directories
+ # so that a single generate_nmf invocation with both x86-32
+ # and x86-64 nexes listed in executables works to generate one
+ # nmf covering both architectures.
+ glibc_tc = "//build/toolchain/nacl:glibc"
+ assert(current_toolchain == "${glibc_tc}_${current_cpu}")
+ x86_out_dir =
+ get_label_info(":${target_name}(${glibc_tc}_x86)", "root_out_dir")
+ x64_out_dir =
+ get_label_info(":${target_name}(${glibc_tc}_x64)", "root_out_dir")
+ nmfflags += [
+ "--library-path=" + rebase_path(x86_out_dir),
+ "--library-path=" + rebase_path(x64_out_dir),
+ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib32"),
+ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib"),
]
- } else if (current_cpu == "x64") {
- nmfflags +=
- [ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib") ]
data = [
+ "${lib_path}/lib32/",
"${lib_path}/lib64/",
]
} else {
- nmfflags +=
- [ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib") ]
+ nmfflags += [
+ "--library-path=" + rebase_path(root_out_dir),
Petr Hosek 2016/05/12 22:08:26 Was this a bug?
Roland McGrath 2016/05/12 22:29:59 Previously this was done above, before this 'if' b
+ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib"),
+ ]
data = [
"${lib_path}/lib/",
]
« no previous file with comments | « no previous file | ppapi/native_client/nacl_test_data.gni » ('j') | ppapi/native_client/nacl_test_data.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698