| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium 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 import("//build/config/nacl/rules.gni") | 7 import("//build/config/nacl/rules.gni") |
| 8 | 8 |
| 9 group("nacl") { | 9 group("nacl") { |
| 10 newlib = "//build/toolchain/nacl:clang_newlib_${target_cpu}" | 10 newlib = "//build/toolchain/nacl:clang_newlib_${target_cpu}" |
| 11 glibc = "//build/toolchain/nacl:glibc_${target_cpu}" | 11 glibc = "//build/toolchain/nacl:glibc_${target_cpu}" |
| 12 pnacl = "//build/toolchain/nacl:newlib_pnacl" | 12 pnacl = "//build/toolchain/nacl:newlib_pnacl" |
| 13 nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi" |
| 13 deps = [ | 14 deps = [ |
| 14 ":exit_status_test($glibc)", | 15 ":exit_status_test($glibc)", |
| 15 ":exit_status_test($newlib)", | 16 ":exit_status_test($newlib)", |
| 16 ":exit_status_test($pnacl)", | 17 ":exit_status_test($pnacl)", |
| 17 ":extension_validation_cache($glibc)", | 18 ":extension_validation_cache($glibc)", |
| 18 ":extension_validation_cache($newlib)", | 19 ":extension_validation_cache($newlib)", |
| 19 ":irt_exception_test($glibc)", | 20 ":irt_exception_test($glibc)", |
| 20 ":irt_exception_test($newlib)", | 21 ":irt_exception_test($newlib)", |
| 22 ":irt_exception_test($nonsfi)", |
| 21 ":irt_exception_test($pnacl)", | 23 ":irt_exception_test($pnacl)", |
| 22 ":irt_manifest_file($newlib)", | 24 ":irt_manifest_file($newlib)", |
| 25 ":irt_manifest_file($nonsfi)", |
| 23 ":partly_invalid($newlib)", | 26 ":partly_invalid($newlib)", |
| 24 ":pnacl_debug_url_test($pnacl)", | 27 ":pnacl_debug_url_test($pnacl)", |
| 25 ":pnacl_dyncode_syscall_disabled_test($pnacl)", | 28 ":pnacl_dyncode_syscall_disabled_test($pnacl)", |
| 26 ":pnacl_error_handling_test($pnacl)", | 29 ":pnacl_error_handling_test($pnacl)", |
| 27 ":pnacl_hw_eh_disabled_test($pnacl)", | 30 ":pnacl_hw_eh_disabled_test($pnacl)", |
| 28 ":pnacl_mime_type_test($glibc)", | 31 ":pnacl_mime_type_test($glibc)", |
| 29 ":pnacl_mime_type_test($newlib)", | 32 ":pnacl_mime_type_test($newlib)", |
| 30 ":pnacl_mime_type_test($pnacl)", | 33 ":pnacl_mime_type_test($pnacl)", |
| 31 ":pnacl_options_test($pnacl)", | 34 ":pnacl_options_test($pnacl)", |
| 32 ":ppapi_bad_get_ppp_instance_crash($newlib)", | 35 ":ppapi_bad_get_ppp_instance_crash($newlib)", |
| (...skipping 25 matching lines...) Expand all Loading... |
| 58 ":ppapi_ppb_instance($newlib)", | 61 ":ppapi_ppb_instance($newlib)", |
| 59 ":ppapi_ppb_instance($pnacl)", | 62 ":ppapi_ppb_instance($pnacl)", |
| 60 ":ppapi_ppp_instance($glibc)", | 63 ":ppapi_ppp_instance($glibc)", |
| 61 ":ppapi_ppp_instance($newlib)", | 64 ":ppapi_ppp_instance($newlib)", |
| 62 ":ppapi_ppp_instance($pnacl)", | 65 ":ppapi_ppp_instance($pnacl)", |
| 63 ":ppapi_progress_events($glibc)", | 66 ":ppapi_progress_events($glibc)", |
| 64 ":ppapi_progress_events($newlib)", | 67 ":ppapi_progress_events($newlib)", |
| 65 ":ppapi_progress_events($pnacl)", | 68 ":ppapi_progress_events($pnacl)", |
| 66 ":shared_test_files($glibc)", | 69 ":shared_test_files($glibc)", |
| 67 ":shared_test_files($newlib)", | 70 ":shared_test_files($newlib)", |
| 71 ":shared_test_files($nonsfi)", |
| 68 ":shared_test_files($pnacl)", | 72 ":shared_test_files($pnacl)", |
| 69 ":simple_test($glibc)", | 73 ":simple_test($glibc)", |
| 70 ":simple_test($newlib)", | 74 ":simple_test($newlib)", |
| 71 ":simple_test($pnacl)", | 75 ":simple_test($pnacl)", |
| 72 ":sysconf_nprocessors_onln_test($glibc)", | 76 ":sysconf_nprocessors_onln_test($glibc)", |
| 73 ":sysconf_nprocessors_onln_test($newlib)", | 77 ":sysconf_nprocessors_onln_test($newlib)", |
| 74 ":sysconf_nprocessors_onln_test($pnacl)", | 78 ":sysconf_nprocessors_onln_test($pnacl)", |
| 75 ] | 79 ] |
| 80 if (is_linux && is_clang) { |
| 81 deps += [ ":nonsfi_libc_free" ] |
| 82 } |
| 76 } | 83 } |
| 77 | 84 |
| 78 if (is_nacl) { | 85 if (is_nacl) { |
| 79 template("nacl_test_data") { | 86 template("nacl_test_data") { |
| 80 if (current_cpu == "pnacl") { | 87 if (current_cpu == "pnacl") { |
| 81 variant = "pnacl" | 88 if (is_nacl_nonsfi) { |
| 89 variant = "nonsfi" |
| 90 } else { |
| 91 variant = "pnacl" |
| 92 } |
| 82 } else if (is_nacl_glibc) { | 93 } else if (is_nacl_glibc) { |
| 83 variant = "glibc" | 94 variant = "glibc" |
| 84 } else { | 95 } else { |
| 85 variant = "newlib" | 96 variant = "newlib" |
| 86 } | 97 } |
| 87 | 98 |
| 88 if (defined(invoker.sources)) { | 99 if (defined(invoker.sources)) { |
| 89 if (defined(invoker.output_name)) { | 100 if (defined(invoker.output_name)) { |
| 90 base_target_name = invoker.output_name | 101 base_target_name = invoker.output_name |
| 91 } else { | 102 } else { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 106 } | 117 } |
| 107 suffixed_target_name = "${base_target_name}_${suffix}" | 118 suffixed_target_name = "${base_target_name}_${suffix}" |
| 108 | 119 |
| 109 if (defined(invoker.generate_nmf)) { | 120 if (defined(invoker.generate_nmf)) { |
| 110 generate_nmf = invoker.generate_nmf | 121 generate_nmf = invoker.generate_nmf |
| 111 } else { | 122 } else { |
| 112 generate_nmf = true | 123 generate_nmf = true |
| 113 } | 124 } |
| 114 | 125 |
| 115 nexe_target_name = target_name + "_nexe" | 126 nexe_target_name = target_name + "_nexe" |
| 127 if (is_nacl_nonsfi) { |
| 128 pexe_translate_target_name = target_name + "_translate_pexe" |
| 129 } |
| 116 nexe_copy_target_name = target_name + "_copy_nexe" | 130 nexe_copy_target_name = target_name + "_copy_nexe" |
| 117 if (generate_nmf) { | 131 if (generate_nmf) { |
| 118 nmf_target_name = target_name + "_nmf" | 132 nmf_target_name = target_name + "_nmf" |
| 119 } | 133 } |
| 120 } | 134 } |
| 121 | 135 |
| 122 if (defined(invoker.test_files)) { | 136 if (defined(invoker.test_files)) { |
| 123 test_files_target_name = target_name + "_test_files" | 137 test_files_target_name = target_name + "_test_files" |
| 124 } | 138 } |
| 125 | 139 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 147 deps += [ | 161 deps += [ |
| 148 "//native_client/src/untrusted/nacl", | 162 "//native_client/src/untrusted/nacl", |
| 149 "//native_client/src/untrusted/pthread", | 163 "//native_client/src/untrusted/pthread", |
| 150 ] | 164 ] |
| 151 } | 165 } |
| 152 if (defined(invoker.deps)) { | 166 if (defined(invoker.deps)) { |
| 153 deps += invoker.deps | 167 deps += invoker.deps |
| 154 } | 168 } |
| 155 } | 169 } |
| 156 | 170 |
| 171 if (is_nacl_nonsfi) { |
| 172 action(pexe_translate_target_name) { |
| 173 # We specify the toolchain explicitly because in the Non-SFI case, we |
| 174 # still want to use the pexe built using the newlib_pnacl toolchain. |
| 175 tests = ":$nexe_target_name(//build/toolchain/nacl:newlib_pnacl)" |
| 176 |
| 177 pexe = get_label_info(tests, "root_out_dir") + |
| 178 "/${suffixed_target_name}.pexe" |
| 179 if (target_cpu == "x86" || target_cpu == "x64") { |
| 180 nmf_cpu = "x32" |
| 181 } else { |
| 182 nmf_cpu = target_cpu |
| 183 } |
| 184 nexe = "${root_out_dir}/${base_target_name}_pnacl_newlib_${nmf_cpu}_no
nsfi.nexe" |
| 185 |
| 186 script = "${nacl_toolchain_bindir}/pydir/loader.py" |
| 187 sources = [ |
| 188 pexe, |
| 189 ] |
| 190 outputs = [ |
| 191 nexe, |
| 192 ] |
| 193 |
| 194 if (target_cpu == "x86" || target_cpu == "x64") { |
| 195 arch = "x86-32-nonsfi" |
| 196 } else if (target_cpu == "arm") { |
| 197 arch = "arm-nonsfi" |
| 198 } |
| 199 |
| 200 pnacl_irt_shim = "//ppapi/native_client/src/untrusted/pnacl_irt_shim:a
ot(//build/toolchain/nacl:newlib_pnacl_nonsfi)" |
| 201 |
| 202 args = [ |
| 203 "pnacl-translate", |
| 204 rebase_path(pexe, root_build_dir), |
| 205 "-o", |
| 206 rebase_path(nexe, root_build_dir), |
| 207 "-arch", |
| 208 arch, |
| 209 "-Wl,-L" + |
| 210 rebase_path(get_label_info(pnacl_irt_shim, "target_out_dir")), |
| 211 ] |
| 212 deps = [ |
| 213 ":$nexe_target_name(//build/toolchain/nacl:newlib_pnacl)", |
| 214 ] |
| 215 data_deps = [ |
| 216 pnacl_irt_shim, |
| 217 ] |
| 218 } |
| 219 } |
| 220 |
| 157 copy(nexe_copy_target_name) { | 221 copy(nexe_copy_target_name) { |
| 158 if (current_cpu == "pnacl") { | 222 if (current_cpu == "pnacl" && !is_nacl_nonsfi) { |
| 159 if (defined(invoker.nonstable_pexe) && invoker.nonstable_pexe) { | 223 if (defined(invoker.nonstable_pexe) && invoker.nonstable_pexe) { |
| 160 sources = [ | 224 sources = [ |
| 161 "${root_out_dir}/exe.unstripped/${suffixed_target_name}.pexe", | 225 "${root_out_dir}/exe.unstripped/${suffixed_target_name}.pexe", |
| 162 ] | 226 ] |
| 163 } else { | 227 } else { |
| 164 sources = [ | 228 sources = [ |
| 165 "${root_out_dir}/${suffixed_target_name}.pexe", | 229 "${root_out_dir}/${suffixed_target_name}.pexe", |
| 166 ] | 230 ] |
| 167 } | 231 } |
| 232 } else if (is_nacl_nonsfi) { |
| 233 sources = get_target_outputs(":${pexe_translate_target_name}") |
| 168 } else { | 234 } else { |
| 169 sources = [ | 235 sources = [ |
| 170 "${root_out_dir}/${suffixed_target_name}.nexe", | 236 "${root_out_dir}/${suffixed_target_name}.nexe", |
| 171 ] | 237 ] |
| 172 } | 238 } |
| 173 outputs = [ | 239 outputs = [ |
| 174 "${root_build_dir}/${destination_dir}/${variant}/{{source_file_part}}"
, | 240 "${root_build_dir}/${destination_dir}/${variant}/{{source_file_part}}"
, |
| 175 ] | 241 ] |
| 176 deps = [ | 242 if (is_nacl_nonsfi) { |
| 177 ":${nexe_target_name}", | 243 deps = [ |
| 178 ] | 244 ":${pexe_translate_target_name}", |
| 245 ] |
| 246 } else { |
| 247 deps = [ |
| 248 ":${nexe_target_name}", |
| 249 ] |
| 250 } |
| 179 } | 251 } |
| 180 } | 252 } |
| 181 | 253 |
| 182 if (defined(invoker.sources) && generate_nmf) { | 254 if (defined(invoker.sources) && generate_nmf) { |
| 183 generate_nmf(nmf_target_name) { | 255 if (is_nacl_nonsfi) { |
| 184 nmf = "${root_build_dir}/${destination_dir}/${variant}/${base_target_nam
e}.nmf" | 256 generate_nonsfi_test_nmf(nmf_target_name) { |
| 185 if (current_cpu == "pnacl") { | 257 nmf = "${root_build_dir}/${destination_dir}/${variant}/${base_target_n
ame}.nmf" |
| 186 executables = [ "${root_build_dir}/${destination_dir}/${variant}/${suf
fixed_target_name}.pexe" ] | 258 files = get_target_outputs(":${nexe_copy_target_name}") |
| 187 } else { | 259 executable = files[0] |
| 188 executables = [ "${root_build_dir}/${destination_dir}/${variant}/${suf
fixed_target_name}.nexe" ] | 260 if (defined(invoker.nmfflags)) { |
| 261 nmfflags = invoker.nmfflags |
| 262 } |
| 263 deps = [ |
| 264 ":${nexe_copy_target_name}", |
| 265 ] |
| 189 } | 266 } |
| 190 if (is_nacl_glibc) { | 267 } else { |
| 191 lib_prefix = "${base_target_name}_libs" | 268 generate_nmf(nmf_target_name) { |
| 192 stage_dependencies = "${root_build_dir}/${destination_dir}/${variant}" | 269 nmf = "${root_build_dir}/${destination_dir}/${variant}/${base_target_n
ame}.nmf" |
| 270 if (current_cpu == "pnacl") { |
| 271 executables = [ "${root_build_dir}/${destination_dir}/${variant}/${s
uffixed_target_name}.pexe" ] |
| 272 } else { |
| 273 executables = [ "${root_build_dir}/${destination_dir}/${variant}/${s
uffixed_target_name}.nexe" ] |
| 274 } |
| 275 if (is_nacl_glibc) { |
| 276 lib_prefix = "${base_target_name}_libs" |
| 277 stage_dependencies = |
| 278 "${root_build_dir}/${destination_dir}/${variant}" |
| 279 } |
| 280 if (defined(invoker.nmfflags)) { |
| 281 nmfflags = invoker.nmfflags |
| 282 } |
| 283 deps = [ |
| 284 ":${nexe_copy_target_name}", |
| 285 ] |
| 193 } | 286 } |
| 194 if (defined(invoker.nmfflags)) { | |
| 195 nmfflags = invoker.nmfflags | |
| 196 } | |
| 197 deps = [ | |
| 198 ":${nexe_copy_target_name}", | |
| 199 ] | |
| 200 } | 287 } |
| 201 } | 288 } |
| 202 | 289 |
| 203 if (defined(invoker.test_files)) { | 290 if (defined(invoker.test_files)) { |
| 204 copy(test_files_target_name) { | 291 copy(test_files_target_name) { |
| 205 sources = invoker.test_files | 292 sources = invoker.test_files |
| 206 outputs = [ | 293 outputs = [ |
| 207 "${root_build_dir}/${destination_dir}/${variant}/{{source_file_part}}"
, | 294 "${root_build_dir}/${destination_dir}/${variant}/{{source_file_part}}"
, |
| 208 ] | 295 ] |
| 296 deps = [] |
| 209 if (defined(invoker.sources)) { | 297 if (defined(invoker.sources)) { |
| 210 deps = [ | 298 deps += [ ":${nexe_target_name}" ] |
| 211 ":${nexe_target_name}", | 299 } |
| 212 ] | 300 if (defined(invoker.files_deps)) { |
| 301 deps += invoker.files_deps |
| 213 } | 302 } |
| 214 } | 303 } |
| 215 } | 304 } |
| 216 | 305 |
| 217 group(target_name) { | 306 group(target_name) { |
| 218 data_deps = [] | 307 data_deps = [] |
| 219 if (defined(invoker.sources)) { | 308 if (defined(invoker.sources)) { |
| 220 data_deps += [ ":${nexe_copy_target_name}" ] | 309 data_deps += [ ":${nexe_copy_target_name}" ] |
| 221 if (generate_nmf) { | 310 if (generate_nmf) { |
| 222 data_deps += [ ":${nmf_target_name}" ] | 311 data_deps += [ ":${nmf_target_name}" ] |
| (...skipping 26 matching lines...) Expand all Loading... |
| 249 "crash/ppapi_crash_in_callback.html", | 338 "crash/ppapi_crash_in_callback.html", |
| 250 "crash/ppapi_crash_ppapi_off_main_thread.html", | 339 "crash/ppapi_crash_ppapi_off_main_thread.html", |
| 251 "crash/ppapi_crash_off_main_thread.html", | 340 "crash/ppapi_crash_off_main_thread.html", |
| 252 "load_util.js", | 341 "load_util.js", |
| 253 "manifest_file/test_file.txt", | 342 "manifest_file/test_file.txt", |
| 254 "progress_event_listener.js", | 343 "progress_event_listener.js", |
| 255 "simple_cc.js", | 344 "simple_cc.js", |
| 256 ] | 345 ] |
| 257 } | 346 } |
| 258 | 347 |
| 348 source_set("ppapi_test_lib") { |
| 349 sources = [ |
| 350 # TODO(ncbray) move these files once SCons no longer depends on them. |
| 351 "//ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc", |
| 352 "//ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h", |
| 353 "//ppapi/native_client/tests/ppapi_test_lib/internal_utils.cc", |
| 354 "//ppapi/native_client/tests/ppapi_test_lib/internal_utils.h", |
| 355 "//ppapi/native_client/tests/ppapi_test_lib/module_instance.cc", |
| 356 "//ppapi/native_client/tests/ppapi_test_lib/test_interface.cc", |
| 357 "//ppapi/native_client/tests/ppapi_test_lib/test_interface.h", |
| 358 "//ppapi/native_client/tests/ppapi_test_lib/testable_callback.cc", |
| 359 "//ppapi/native_client/tests/ppapi_test_lib/testable_callback.h", |
| 360 ] |
| 361 deps = [ |
| 362 "//native_client/src/shared/gio", |
| 363 "//native_client/src/shared/platform", |
| 364 "//ppapi/native_client:ppapi_lib", |
| 365 ] |
| 366 } |
| 367 |
| 368 nacl_test_data("irt_manifest_file") { |
| 369 sources = [ |
| 370 "manifest_file/irt_manifest_file_test.cc", |
| 371 ] |
| 372 nmfflags = [ |
| 373 "-xtest_file:test_file.txt", |
| 374 "-xnmf says hello world:test_file.txt", |
| 375 |
| 376 # There is no dummy_test_file.txt file intentionally. This is just for |
| 377 # a test case where there is a manifest entry, but no actual file. |
| 378 "-xdummy_test_file:dummy_test_file.txt", |
| 379 ] |
| 380 test_files = [ "manifest_file/irt_manifest_file_test.html" ] |
| 381 } |
| 382 |
| 383 nacl_test_data("irt_exception_test") { |
| 384 sources = [ |
| 385 "irt_exception/irt_exception_test.cc", |
| 386 ] |
| 387 deps = [ |
| 388 ":ppapi_test_lib", |
| 389 "//native_client/src/untrusted/nacl:nacl_exception", |
| 390 ] |
| 391 test_files = [ "irt_exception/irt_exception_test.html" ] |
| 392 } |
| 393 } |
| 394 |
| 395 if (is_nacl && !is_nacl_nonsfi) { |
| 259 nacl_test_data("simple_test") { | 396 nacl_test_data("simple_test") { |
| 260 output_name = "simple" | 397 output_name = "simple" |
| 261 sources = [ | 398 sources = [ |
| 262 "simple.cc", | 399 "simple.cc", |
| 263 ] | 400 ] |
| 264 test_files = [ "nacl_load_test.html" ] | 401 test_files = [ "nacl_load_test.html" ] |
| 265 } | 402 } |
| 266 | 403 |
| 267 nacl_test_data("exit_status_test") { | 404 nacl_test_data("exit_status_test") { |
| 268 output_name = "pm_exit_status_test" | 405 output_name = "pm_exit_status_test" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 297 } | 434 } |
| 298 | 435 |
| 299 nacl_test_data("sysconf_nprocessors_onln_test") { | 436 nacl_test_data("sysconf_nprocessors_onln_test") { |
| 300 sources = [ | 437 sources = [ |
| 301 "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc", | 438 "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.cc", |
| 302 ] | 439 ] |
| 303 test_files = | 440 test_files = |
| 304 [ "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.html" ] | 441 [ "sysconf_nprocessors_onln/sysconf_nprocessors_onln_test.html" ] |
| 305 } | 442 } |
| 306 | 443 |
| 307 source_set("ppapi_test_lib") { | |
| 308 sources = [ | |
| 309 # TODO(ncbray) move these files once SCons no longer depends on them. | |
| 310 "//ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.cc", | |
| 311 "//ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h", | |
| 312 "//ppapi/native_client/tests/ppapi_test_lib/internal_utils.cc", | |
| 313 "//ppapi/native_client/tests/ppapi_test_lib/internal_utils.h", | |
| 314 "//ppapi/native_client/tests/ppapi_test_lib/module_instance.cc", | |
| 315 "//ppapi/native_client/tests/ppapi_test_lib/test_interface.cc", | |
| 316 "//ppapi/native_client/tests/ppapi_test_lib/test_interface.h", | |
| 317 "//ppapi/native_client/tests/ppapi_test_lib/testable_callback.cc", | |
| 318 "//ppapi/native_client/tests/ppapi_test_lib/testable_callback.h", | |
| 319 ] | |
| 320 deps = [ | |
| 321 "//native_client/src/shared/gio", | |
| 322 "//native_client/src/shared/platform", | |
| 323 "//ppapi/native_client:ppapi_lib", | |
| 324 ] | |
| 325 } | |
| 326 | |
| 327 nacl_test_data("ppapi_progress_events") { | 444 nacl_test_data("ppapi_progress_events") { |
| 328 sources = [ | 445 sources = [ |
| 329 "progress_events/ppapi_progress_events.cc", | 446 "progress_events/ppapi_progress_events.cc", |
| 330 ] | 447 ] |
| 331 test_files = [ "progress_events/ppapi_progress_events.html" ] | 448 test_files = [ "progress_events/ppapi_progress_events.html" ] |
| 332 deps = [ | 449 deps = [ |
| 333 ":ppapi_test_lib", | 450 ":ppapi_test_lib", |
| 334 ] | 451 ] |
| 335 } | 452 } |
| 336 | 453 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 | 528 |
| 412 nacl_test_data("ppapi_crash_ppapi_off_main_thread") { | 529 nacl_test_data("ppapi_crash_ppapi_off_main_thread") { |
| 413 sources = [ | 530 sources = [ |
| 414 "crash/ppapi_crash_ppapi_off_main_thread.cc", | 531 "crash/ppapi_crash_ppapi_off_main_thread.cc", |
| 415 ] | 532 ] |
| 416 deps = [ | 533 deps = [ |
| 417 ":ppapi_test_lib", | 534 ":ppapi_test_lib", |
| 418 ] | 535 ] |
| 419 } | 536 } |
| 420 | 537 |
| 421 nacl_test_data("irt_manifest_file") { | |
| 422 sources = [ | |
| 423 "manifest_file/irt_manifest_file_test.cc", | |
| 424 ] | |
| 425 nmfflags = [ | |
| 426 "-xtest_file:test_file.txt", | |
| 427 "-xnmf says hello world:test_file.txt", | |
| 428 | |
| 429 # There is no dummy_test_file.txt file intentionally. This is just for | |
| 430 # a test case where there is a manifest entry, but no actual file. | |
| 431 "-xdummy_test_file:dummy_test_file.txt", | |
| 432 ] | |
| 433 test_files = [ "manifest_file/irt_manifest_file_test.html" ] | |
| 434 } | |
| 435 | |
| 436 nacl_test_data("irt_exception_test") { | |
| 437 sources = [ | |
| 438 "irt_exception/irt_exception_test.cc", | |
| 439 ] | |
| 440 deps = [ | |
| 441 ":ppapi_test_lib", | |
| 442 "//native_client/src/untrusted/nacl:nacl_exception", | |
| 443 ] | |
| 444 test_files = [ "irt_exception/irt_exception_test.html" ] | |
| 445 } | |
| 446 | |
| 447 nacl_test_data("ppapi_extension_mime_handler") { | 538 nacl_test_data("ppapi_extension_mime_handler") { |
| 448 sources = [ | 539 sources = [ |
| 449 "extension_mime_handler/ppapi_extension_mime_handler.cc", | 540 "extension_mime_handler/ppapi_extension_mime_handler.cc", |
| 450 ] | 541 ] |
| 451 deps = [ | 542 deps = [ |
| 452 ":ppapi_test_lib", | 543 ":ppapi_test_lib", |
| 453 ] | 544 ] |
| 454 test_files = [ | 545 test_files = [ |
| 455 "extension_mime_handler/ppapi_extension_mime_handler.html", | 546 "extension_mime_handler/ppapi_extension_mime_handler.html", |
| 456 "extension_mime_handler/mime_test_data.dat", | 547 "extension_mime_handler/mime_test_data.dat", |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 cflags = [ | 676 cflags = [ |
| 586 "--pnacl-mips-bias", | 677 "--pnacl-mips-bias", |
| 587 "-arch", | 678 "-arch", |
| 588 "mips32", | 679 "mips32", |
| 589 "--pnacl-allow-translate", | 680 "--pnacl-allow-translate", |
| 590 ] | 681 ] |
| 591 ldflags = [ "--pnacl-allow-native" ] | 682 ldflags = [ "--pnacl-allow-native" ] |
| 592 } | 683 } |
| 593 } | 684 } |
| 594 } | 685 } |
| 686 } |
| 595 | 687 |
| 596 # TODO(phosek): convert the non-SFI tests. | 688 if (is_linux && is_clang) { |
| 689 if (target_cpu == "x86") { |
| 690 arch = "x86_32" |
| 691 } else if (target_cpu == "x64") { |
| 692 arch = "x86_64" |
| 693 } else { |
| 694 arch = target_cpu |
| 695 } |
| 696 |
| 697 config("nonsfi_libc_free_nexe_config") { |
| 698 cflags = [ |
| 699 "-Wno-sign-compare", |
| 700 |
| 701 # Stack-Smashing protector does not work with libc-free context. |
| 702 "-fno-stack-protector", |
| 703 |
| 704 # Optimizers may translate the original code to code which |
| 705 # requires builtin functions and/or relocations. Specifically, |
| 706 # the LLVM's optimizer translates for-loop based zero |
| 707 # clear to memset. |
| 708 "-O0", |
| 709 |
| 710 # ARM GCC emits symbols like __aeabi_unwind_cpp_pr0 in |
| 711 # .exidx sections without this flag. |
| 712 "-fno-unwind-tables", |
| 713 ] |
| 714 } |
| 715 |
| 716 executable("nonsfi_libc_free_nexe") { |
| 717 output_name = "libc_free_$arch" |
| 718 output_extension = "nexe" |
| 719 sources = [ |
| 720 "nonsfi/libc_free.c", |
| 721 ] |
| 722 |
| 723 # Here, we would like to link a relocatable, libc-free executable. |
| 724 # -shared/-fPIC make this binary relocatable. -nostdlib ensures |
| 725 # this is libc-free. |
| 726 # The program does not apply any dynamic relocations at start up, |
| 727 # so it cannot rely on relocations having been applied. |
| 728 # In addition, -fvisibility=hidden avoids creating some types |
| 729 # of relocation. |
| 730 cflags = [ |
| 731 "-fPIC", |
| 732 "-fvisibility=hidden", |
| 733 ] |
| 734 ldflags = [ |
| 735 "-nostdlib", |
| 736 "-shared", |
| 737 |
| 738 # This binary cannot relocate itself, so we should have no |
| 739 # undefined references left. |
| 740 "-Wl,--no-undefined", |
| 741 |
| 742 # Silence the warning about the unused '-pthread' argument. |
| 743 "-Qunused-arguments", |
| 744 ] |
| 745 defines = [ "NACL_LINUX=1" ] |
| 746 include_dirs = [ "../../../.." ] |
| 747 configs += [ ":nonsfi_libc_free_nexe_config" ] |
| 748 } |
| 749 |
| 750 copy("nonsfi_libc_free") { |
| 751 sources = [ |
| 752 "${root_out_dir}/libc_free_${arch}.nexe", |
| 753 |
| 754 # TODO(ncbray) move into chrome/test/data/nacl when all tests are |
| 755 # converted. |
| 756 "//ppapi/native_client/tools/browser_tester/browserdata/nacltest.js", |
| 757 "nonsfi/irt_test.html", |
| 758 "nonsfi/libc_free.html", |
| 759 "nonsfi/libc_free.nmf", |
| 760 ] |
| 761 outputs = [ |
| 762 "${root_build_dir}/nacl_test_data/libc-free/{{source_file_part}}", |
| 763 ] |
| 764 deps = [ |
| 765 ":nonsfi_libc_free_nexe", |
| 766 ] |
| 767 } |
| 597 } | 768 } |
| OLD | NEW |