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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Native Client Authors. All rights reserved. 1 # Copyright 2015 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/nacl/config.gni") 6 import("//build/config/nacl/config.gni")
7 7
8 # Generate a nmf file 8 # Generate a nmf file
9 # 9 #
10 # Native Client Manifest (nmf) is a JSON file that tells the browser where to 10 # Native Client Manifest (nmf) is a JSON file that tells the browser where to
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 rebase_path(stage_dependencies, root_build_dir) ] 64 rebase_path(stage_dependencies, root_build_dir) ]
65 lib_path = stage_dependencies 65 lib_path = stage_dependencies
66 } else { 66 } else {
67 lib_path = root_build_dir 67 lib_path = root_build_dir
68 } 68 }
69 if (defined(lib_prefix)) { 69 if (defined(lib_prefix)) {
70 nmfflags += [ "--lib-prefix=" + lib_prefix ] 70 nmfflags += [ "--lib-prefix=" + lib_prefix ]
71 lib_path += "/${lib_prefix}" 71 lib_path += "/${lib_prefix}"
72 } 72 }
73 73
74 # NOTE: There is no explicit dependency for the lib32 74 # NOTE: There is no explicit dependency for the lib directory
75 # and lib64 directories created in the product directory. 75 # (lib32 and lib64 for x86/x64) created in the product directory.
76 # They are created as a side-effect of nmf creation. 76 # They are created as a side-effect of nmf creation.
77 nmfflags += [ "--library-path=" + rebase_path(root_out_dir) ] 77 if (current_cpu == "x86" || current_cpu == "x64") {
78 if (current_cpu == "x86") { 78 # For x86, include both x86-32 and x86-64 library directories
79 nmfflags += [ "--library-path=" + 79 # so that a single generate_nmf invocation with both x86-32
80 rebase_path("${nacl_toolchain_tooldir}/lib32") ] 80 # and x86-64 nexes listed in executables works to generate one
81 # nmf covering both architectures.
82 glibc_tc = "//build/toolchain/nacl:glibc"
83 assert(current_toolchain == "${glibc_tc}_${current_cpu}")
84 x86_out_dir =
85 get_label_info(":${target_name}(${glibc_tc}_x86)", "root_out_dir")
86 x64_out_dir =
87 get_label_info(":${target_name}(${glibc_tc}_x64)", "root_out_dir")
88 nmfflags += [
89 "--library-path=" + rebase_path(x86_out_dir),
90 "--library-path=" + rebase_path(x64_out_dir),
91 "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib32"),
92 "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib"),
93 ]
81 data = [ 94 data = [
82 "${lib_path}/lib32/", 95 "${lib_path}/lib32/",
83 ]
84 } else if (current_cpu == "x64") {
85 nmfflags +=
86 [ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib") ]
87 data = [
88 "${lib_path}/lib64/", 96 "${lib_path}/lib64/",
89 ] 97 ]
90 } else { 98 } else {
91 nmfflags += 99 nmfflags += [
92 [ "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib") ] 100 "--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
101 "--library-path=" + rebase_path("${nacl_toolchain_tooldir}/lib"),
102 ]
93 data = [ 103 data = [
94 "${lib_path}/lib/", 104 "${lib_path}/lib/",
95 ] 105 ]
96 } 106 }
97 } 107 }
98 args = [ 108 args = [
99 "--no-default-libpath", 109 "--no-default-libpath",
100 "--objdump=" + objdump, 110 "--objdump=" + objdump,
101 "--output=" + rebase_path(nmf, root_build_dir), 111 "--output=" + rebase_path(nmf, root_build_dir),
102 ] + nmfflags + rebase_path(sources, root_build_dir) 112 ] + nmfflags + rebase_path(sources, root_build_dir)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 args = [ 162 args = [
153 "--program=" + rebase_path(executable, root_build_dir), 163 "--program=" + rebase_path(executable, root_build_dir),
154 "--arch=${arch}", 164 "--arch=${arch}",
155 "--output=" + rebase_path(nmf, root_build_dir), 165 "--output=" + rebase_path(nmf, root_build_dir),
156 ] 166 ]
157 if (defined(invoker.nmfflags)) { 167 if (defined(invoker.nmfflags)) {
158 args += invoker.nmfflags 168 args += invoker.nmfflags
159 } 169 }
160 } 170 }
161 } 171 }
OLDNEW
« 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