Import chromium-64.0.3282.140

This commit is contained in:
klzgrad
2018-02-02 05:49:39 -05:00
commit 86b64329f6
19589 changed files with 4029211 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
group("trusted_targets") {
deps = [
"//native_client/src/shared/imc:imc",
"//native_client/src/shared/platform:platform",
"//native_client/src/trusted/cpu_features:all_cpu_features",
"//native_client/src/trusted/debug_stub:debug_stub",
"//native_client/src/trusted/desc:nrd_xfer",
"//native_client/src/trusted/desc:nrd_xfer",
"//native_client/src/trusted/fault_injection:nacl_fault_inject",
"//native_client/src/trusted/interval_multiset:nacl_interval",
"//native_client/src/trusted/nacl_base:nacl_base",
"//native_client/src/trusted/perf_counter:nacl_perf_counter",
"//native_client/src/trusted/platform_qualify:platform_qual_lib",
"//native_client/src/trusted/service_runtime:env_cleanser",
"//native_client/src/trusted/service_runtime:nacl_error_code",
"//native_client/src/trusted/service_runtime:sel",
"//native_client/src/trusted/service_runtime:sel_ldr",
"//native_client/src/trusted/service_runtime:sel_main",
"//native_client/src/trusted/validator/driver:elf_load",
"//native_client/src/trusted/validator/driver:ncval_new",
"//native_client/src/trusted/validator_ragel:rdfa_validator",
]
if (is_linux) {
deps += [ "//native_client/src/nonsfi/loader:nonsfi_loader" ]
}
}
group("tests") {
testonly = true
deps = [
"//native_client/tests:large_tests",
"//native_client/tests:medium_tests",
"//native_client/tests:small_tests",
]
}
if (is_nacl) {
group("untrusted_targets") {
deps = [
"//native_client/src/shared/gio:gio",
"//native_client/src/shared/platform:platform",
"//native_client/src/untrusted/elf_loader:elf_loader",
"//native_client/src/untrusted/nacl:imc_syscalls",
"//native_client/tests/hello_world:hello_world",
]
}
group("irt_targets") {
deps = [
"//native_client/src/untrusted/irt:irt_core",
]
}
}

View File

@@ -0,0 +1,45 @@
# Copyright 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("irt_interfaces") {
sources = [
"../../untrusted/irt/irt_query_list.c",
"irt_interfaces.c",
"irt_random.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
if (is_nacl) {
static_library("nacl_sys_private") {
cflags = [ "-fgnu-inline-asm" ]
# We reset sources_assignment_filter in order to explicitly include
# the Linux files (which could otherwise be filtered out).
set_sources_assignment_filter([])
sources = [
"../../untrusted/irt/irt_query_list.c",
"../../untrusted/pthread/nc_condvar.c",
"../../untrusted/pthread/nc_mutex.c",
"../../untrusted/pthread/nc_thread.c",
"../../untrusted/pthread/stack_end.c",
"../../untrusted/valgrind/dynamic_annotations.c",
"../linux/directory.c",
"../linux/irt_signal_handling.c",
"../linux/linux_futex.c",
"../linux/linux_pthread_private.c",
"../linux/linux_sys_private.c",
"irt_icache.c",
"irt_interfaces.c",
"irt_random.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
}

View File

@@ -0,0 +1,35 @@
# Copyright 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("elf_loader") {
sources = [
"elf_loader.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}
if (is_linux || is_nacl) {
executable("nonsfi_loader") {
sources = [
"elf_loader_main.c",
]
deps = [
":elf_loader",
"//build/config:exe_and_shlib_deps",
"//native_client/src/nonsfi/irt:irt_interfaces",
"//native_client/src/shared/platform",
]
if (is_nacl) {
deps += [
"//native_client/src/nonsfi/irt:nacl_sys_private",
"//native_client/src/untrusted/nacl",
]
}
}
}

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("gio") {
sources = [
"gio.c",
"gprintf.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}

View File

@@ -0,0 +1,41 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("imc") {
sources = [
"nacl_imc_common.cc",
]
if (current_os == "nacl") {
sources += [ "nacl/nacl_imc.cc" ]
}
if (current_os == "mac") {
sources += [
"osx/nacl_imc.cc",
"posix/nacl_imc_posix.cc",
]
}
if (is_linux) {
sources += [
"linux/nacl_imc.cc",
"posix/nacl_imc_posix.cc",
]
libs = [ "rt" ]
}
if (current_os == "win") {
sources += [
"win/nacl_imc.cc",
"win/nacl_shm.cc",
]
}
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}

View File

@@ -0,0 +1,107 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/shared/platform/build.scons.
static_library("platform") {
if (current_os == "nacl") {
sources = [
"nacl_check.c",
"nacl_log.c",
"posix/condition_variable.c",
"posix/lock.c",
"posix/nacl_error.c",
"posix/nacl_exit.c",
"posix/nacl_thread_id.c",
"posix/nacl_threads.c",
"posix/nacl_timestamp.c",
"nacl_sync_checked.c",
"refcount_base.cc",
]
} else {
sources = [
"nacl_check.c",
"nacl_global_secure_random.c",
"nacl_host_desc_common.c",
"nacl_interruptible_condvar.c",
"nacl_interruptible_mutex.c",
"nacl_log.c",
"nacl_secure_random_common.c",
"nacl_sync_checked.c",
"nacl_time_common.c",
"platform_init.c",
"refcount_base.cc",
]
if (current_os != "win") {
sources += [
"posix/aligned_malloc.c",
"posix/condition_variable.c",
"posix/lock.c",
"posix/nacl_error.c",
"posix/nacl_exit.c",
"posix/nacl_fast_mutex.c",
"posix/nacl_file_lock.c",
"posix/nacl_find_addrsp.c",
"posix/nacl_host_desc.c",
"posix/nacl_secure_random.c",
"posix/nacl_thread_id.c",
"posix/nacl_threads.c",
"posix/nacl_time.c",
"posix/nacl_timestamp.c",
]
}
if (current_os == "win") {
sources += [
"win/aligned_malloc.c",
"win/condition_variable.cc",
"win/lock.cc",
"win/lock_impl_win.cc",
"win/nacl_clock.c",
"win/nacl_error.c",
"win/nacl_exit.c",
"win/nacl_fast_mutex.c",
"win/nacl_find_addrsp.c",
"win/nacl_host_desc.c",
"win/nacl_host_dir.c",
"win/nacl_secure_random.c",
"win/nacl_semaphore.c",
"win/nacl_sync_win.cc",
"win/nacl_threads.c",
"win/nacl_time.c",
"win/nacl_timestamp.c",
"win/port_win.c",
"win/xlate_system_error.c",
]
}
if (current_os == "mac") {
sources += [
"osx/nacl_clock.c",
"osx/nacl_host_dir.c",
"osx/nacl_semaphore.c",
]
}
if (is_linux) {
sources += [
"linux/nacl_clock.c",
"linux/nacl_host_dir.c",
"linux/nacl_semaphore.c",
]
}
if (current_os == "win") {
cflags_c = [
"/DUNICODE",
"/D_CRT_RAND_S",
"/D_UNICODE",
]
}
}
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/gio:gio",
]
}

View File

@@ -0,0 +1,16 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
executable("tls_edit") {
sources = [
"tls_edit.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
"//native_client/src/shared/platform:platform",
"//native_client/src/trusted/validator_ragel:rdfa_validator",
]
}

View File

@@ -0,0 +1,19 @@
# Copyright (c) 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Almost all of the x86 assembly code in src/trusted is written using
# GNU/AT&T syntax. On Windows, this means it has to be built using a
# nonstandard toolchain (GNU binutils rather than MSVC). Each place in
# src/trusted where there is some assembly code puts the assembly code into
# a separate source_set and then pulls that into a larger source_set using
# deps = [ ":foo_asm($nacl_asm_toolchain)" ]. On Windows, this will get a
# special toolchain for running the GNU assembler. On non-Windows, this is
# just the regular toolchain.
if (is_win) {
nacl_asm_toolchain =
"//native_client/src/trusted/win:nacl_win_as_$current_cpu"
} else {
nacl_asm_toolchain = current_toolchain
}

View File

@@ -0,0 +1,43 @@
# Copyright 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//native_client/src/trusted/asm.gni")
group("all_cpu_features") {
deps = [
":cpu_features",
]
}
if (current_toolchain == nacl_asm_toolchain) {
source_set("cpu_features_asm") {
if (current_cpu == "x64" || current_cpu == "x86") {
sources = [
"arch/x86/cpu_xgetbv.S",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
}
source_set("cpu_features") {
include_dirs = [ "." ]
sources = [
"arch/arm/cpu_arm.c",
"arch/mips/cpu_mips.c",
]
if (current_cpu == "x64" || current_cpu == "x86") {
sources += [
"arch/x86/cpu_x86.c",
]
}
deps = [
"//build/config/nacl:nacl_base",
":cpu_features_asm($nacl_asm_toolchain)",
]
}

View File

@@ -0,0 +1,57 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/sanitizers/sanitizers.gni")
static_library("debug_stub") {
sources = [
"abi.cc",
"debug_stub.cc",
"nacl_debug.cc",
"packet.cc",
"session.cc",
"target.cc",
"thread_common.cc",
"transport_common.cc",
"transport_ipc.cc",
"util.cc",
]
if (current_os != "win") {
sources += [
"posix/debug_stub_posix.cc",
"posix/platform_impl.cc",
"posix/thread_impl.cc",
]
}
if (current_os == "win") {
sources += [
"win/debug_stub_win.cc",
"win/platform_impl.cc",
"win/thread_impl.cc",
]
}
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}
executable("gdb_rsp_unittest") {
sources = [
"abi_test.cc",
"packet_test.cc",
"session_test.cc",
"test.cc",
"util_test.cc",
]
deps = [
":debug_stub",
"//build/config/nacl:nacl_base",
# All executables must have the sanitizer deps to properly link in
# asan mode (this target will be empty in other cases).
"//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
]
}

View File

@@ -0,0 +1,52 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("nrd_xfer") {
sources = [
"nacl_desc_base.c",
"nacl_desc_cond.c",
"nacl_desc_custom.c",
"nacl_desc_dir.c",
"nacl_desc_effector_trusted_mem.c",
"nacl_desc_imc.c",
"nacl_desc_imc_shm.c",
"nacl_desc_invalid.c",
"nacl_desc_io.c",
"nacl_desc_mutex.c",
"nacl_desc_null.c",
"nacl_desc_quota.c",
"nacl_desc_quota_interface.c",
"nacl_desc_semaphore.c",
"nacl_desc_sync_socket.c",
"nrd_all_modules.c",
"nrd_xfer.c",
]
if (current_os != "win") {
sources += [
"posix/nacl_desc.c",
"posix/nacl_desc_conn_cap.c",
"posix/nacl_desc_imc_bound_desc.c",
"posix/nacl_makeboundsock.c",
]
} else {
sources += [
"win/nacl_desc.c",
"nacl_desc_conn_cap.c",
"nacl_desc_imc_bound_desc.c",
"nacl_makeboundsock.c",
]
}
if (current_os == "mac") {
sources += [
"osx/nacl_desc_imc_shm_mach.c",
]
}
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/imc:imc",
"//native_client/src/trusted/nacl_base:nacl_base",
]
}

View File

@@ -0,0 +1,17 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/trusted/fault_injection/build.scons.
static_library("nacl_fault_inject") {
sources = [
"fault_injection.c",
"test_injection.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}

View File

@@ -0,0 +1,17 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/trusted/interval_multiset/build.scons.
static_library("nacl_interval") {
sources = [
"nacl_interval_list.c",
"nacl_interval_multiset_delete.c",
"nacl_interval_multiset_factory.c",
"nacl_interval_range_tree.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}

View File

@@ -0,0 +1,16 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/trusted/nacl_base/build.scons.
static_library("nacl_base") {
sources = [
"nacl_refcount.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/trusted/perf_counter/build.scons.
static_library("nacl_perf_counter") {
sources = [
"nacl_perf_counter.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}

View File

@@ -0,0 +1,78 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/trusted/platform_qualify/build.scons.
static_library("platform_qual_lib") {
sources = []
if (current_os != "win") {
sources += [ "posix/nacl_dep_qualify.c" ]
}
if (current_cpu != "arm") {
sources += [ "arch/x86/nacl_cpuwhitelist.c" ]
}
if (current_cpu == "x86") {
sources += [ "arch/x86_32/nacl_dep_qualify_arch.c" ]
}
if (current_cpu == "x64") {
sources += [ "arch/x86_64/nacl_dep_qualify_arch.c" ]
}
if (current_cpu == "arm") {
sources += [
"arch/arm/nacl_dep_qualify_arch.c",
"arch/arm/nacl_qualify_fpu.c",
"arch/arm/nacl_qualify_sandbox_instrs.c",
"arch/arm/nacl_qualify_unaligned.c",
]
}
if (current_cpu == "mipsel") {
sources += ["arch/mips/nacl_qualify_fpu.c"]
}
if (current_os == "win") {
sources += [
"win/nacl_dep_qualify.c",
"win/nacl_os_qualify.c",
]
}
if (current_os == "mac") {
sources += [ "osx/nacl_os_qualify.c" ]
}
if (is_linux) {
sources += [ "linux/nacl_os_qualify.c" ]
}
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/trusted/cpu_features:cpu_features",
]
}
if (current_cpu != "arm" && current_cpu != "mipsel") {
static_library("vcpuid") {
cflags_c = []
sources = [
"arch/x86/vcpuid.c",
]
if (current_os == "linux") {
cflags_c += [ "-msse3" ]
}
if (current_os == "mac") {
cflags_c += [ "-mdynamic-no-pic" ]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
}

View File

@@ -0,0 +1,359 @@
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/toolchain.gni")
import("//native_client/src/trusted/asm.gni")
if (is_mac) {
import("//build/config/sysroot.gni")
}
source_set("sel_main") {
sources = [
"sel_main.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/trusted/debug_stub:debug_stub",
":sel",
]
}
source_set("sel_main_chrome") {
sources = [
"sel_main_chrome.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/trusted/debug_stub:debug_stub",
":sel",
]
}
source_set("env_cleanser") {
sources = [
"env_cleanser.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
source_set("nacl_error_code") {
sources = [
"nacl_error_code.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
if (current_toolchain == nacl_asm_toolchain) {
source_set("sel_asm") {
if (current_cpu == "x86") {
sources = [
"arch/x86_32/nacl_switch_32.S",
"arch/x86_32/nacl_switch_all_regs_asm_32.S",
"arch/x86_32/nacl_syscall_32.S",
"arch/x86_32/springboard.S",
"arch/x86_32/tramp_32.S",
]
} else if (current_cpu == "x64") {
sources = [
"arch/x86_64/nacl_switch_64.S",
"arch/x86_64/nacl_syscall_64.S",
"arch/x86_64/tramp_64.S",
]
if (is_win) {
sources += [
"arch/x86_64/fnstcw.S",
"arch/x86_64/fxsaverstor.S",
"win/exception_patch/exit_fast.S",
"win/exception_patch/intercept.S",
]
}
} else if (current_cpu == "arm") {
sources = [
"arch/arm/nacl_switch.S",
"arch/arm/nacl_syscall.S",
"arch/arm/tramp_arm.S",
]
} else if (current_cpu == "mipsel") {
sources = [
"arch/mips/nacl_switch.S",
"arch/mips/nacl_syscall.S",
"arch/mips/tramp_mips.S",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
}
source_set("sel") {
sources = [
"dyn_array.c",
"elf_util.c",
"filename_util.cc",
"load_file.c",
"nacl_all_modules.c",
"nacl_app_thread.c",
"nacl_copy.c",
"nacl_desc_effector_ldr.c",
"nacl_error_gio.c",
"nacl_error_log_hook.c",
"nacl_globals.c",
"nacl_resource.c",
"nacl_signal_common.c",
"nacl_stack_safety.c",
"nacl_syscall_common.c",
"nacl_syscall_hook.c",
"nacl_syscall_list.c",
"nacl_text.c",
"nacl_valgrind_hooks.c",
"sel_addrspace.c",
"sel_ldr.c",
"sel_ldr_filename.cc",
"sel_ldr_standard.c",
"sel_main_common.c",
"sel_mem.c",
"sel_qualify.c",
"sel_validate_image.c",
"sys_clock.c",
"sys_exception.c",
"sys_fdio.c",
"sys_filename.c",
"sys_futex.c",
"sys_imc.c",
"sys_list_mappings.c",
"sys_memory.c",
"sys_parallel_io.c",
"sys_random.c",
"thread_suspension_common.c",
"thread_suspension_unwind.c",
]
if (is_linux) {
sources += [ "linux/nacl_signal.c" ]
}
if (is_mac) {
sources += [
"osx/crash_filter.c",
"osx/mach_exception_handler.c",
"osx/mach_thread_map.c",
"osx/nacl_ldt.c",
"osx/nacl_thread_nice.c",
"osx/thread_suspension.c",
"posix/addrspace_teardown.c",
"posix/sel_memory.c",
"posix/x86/sel_segments.c",
]
}
if (is_win) {
sources += [
"win/addrspace_teardown.c",
"win/debug_exception_handler.c",
"win/debug_exception_handler_standalone.c",
"win/nacl_ldt.c",
"win/nacl_thread_nice.c",
"win/sel_memory.c",
"win/sel_segments.c",
"win/thread_handle_map.c",
]
}
if (current_cpu == "arm") {
sources += [
"arch/arm/nacl_app.c",
"arch/arm/nacl_switch_to_app_arm.c",
"arch/arm/nacl_tls.c",
"arch/arm/sel_addrspace_arm.c",
"arch/arm/sel_ldr_arm.c",
"arch/arm/sel_rt.c",
"linux/nacl_signal_arm.c",
]
}
if (current_cpu == "mipsel") {
sources += [
"arch/mips/nacl_app.c",
"arch/mips/nacl_switch_to_app_mips.c",
"arch/mips/nacl_tls.c",
"arch/mips/sel_addrspace_mips.c",
"arch/mips/sel_ldr_mips.c",
"arch/mips/sel_rt.c",
"linux/nacl_signal_mips.c",
]
}
if (is_linux || is_android) {
sources += [
"linux/nacl_bootstrap_args.c",
"linux/nacl_thread_nice.c",
"linux/r_debug.c",
"linux/reserved_at_zero.c",
"linux/thread_suspension.c",
"posix/addrspace_teardown.c",
"posix/sel_memory.c",
]
if (current_cpu == "x86" || current_cpu == "x64") {
sources += [
"linux/x86/nacl_ldt.c",
"posix/x86/sel_segments.c",
]
}
if (current_cpu == "arm") {
sources += [ "linux/arm/sel_segments.c" ]
}
if (current_cpu == "mipsel") {
sources += [ "linux/mips/sel_segments.c" ]
}
}
if (is_posix) {
sources += [
"posix/nacl_signal_stack.c",
"posix/sel_addrspace_posix.c",
]
}
if (is_win) {
sources += [
"win/nacl_signal_stack.c",
"win/sel_addrspace_win.c",
"win/thread_suspension.c",
"win/vm_hole.c",
]
} else {
sources += [ "generic/vm_hole.c" ]
}
if (current_cpu == "x86" || current_cpu == "x64") {
sources += [
"arch/x86/nacl_ldt_x86.c",
]
}
if (current_cpu == "x86") {
sources += [
"arch/x86_32/nacl_app_32.c",
"arch/x86_32/nacl_switch_all_regs_32.c",
"arch/x86_32/nacl_switch_to_app_32.c",
"arch/x86_32/nacl_tls_32.c",
"arch/x86_32/sel_addrspace_x86_32.c",
"arch/x86_32/sel_ldr_x86_32.c",
"arch/x86_32/sel_rt_32.c",
]
if (is_mac) {
sources += [ "osx/nacl_signal_32.c" ]
}
if (is_linux) {
sources += [ "linux/nacl_signal_32.c" ]
}
if (is_win) {
sources += [ "win/nacl_signal_32.c" ]
}
}
if (current_cpu == "x64") {
sources += [
"arch/x86_64/nacl_app_64.c",
"arch/x86_64/nacl_switch_to_app_64.c",
"arch/x86_64/nacl_tls_64.c",
"arch/x86_64/sel_ldr_x86_64.c",
"arch/x86_64/sel_rt_64.c",
]
if (is_mac) {
sources += [
"osx/nacl_signal_64.c",
"arch/x86_64/sel_addrspace_posix_x86_64.c",
]
}
if (is_linux) {
sources += [
"linux/nacl_signal_64.c",
"arch/x86_64/sel_addrspace_posix_x86_64.c",
]
}
if (is_win) {
sources += [
"win/exception_patch/ntdll_patch.c",
"win/nacl_signal_64.c",
# We assemble the .asm assembly file with the Microsoft assembler
# because we need to generate x86-64 Windows unwind info, which the
# GNU assembler we use elsewhere does not support.
"arch/x86_64/nacl_switch_unwind_win.asm",
"arch/x86_64/sel_addrspace_win_x86_64.c",
]
}
defines = [ "NACL_X86_64_ZERO_BASED_SANDBOX=0" ]
}
deps = [
"//build/config/nacl:nacl_base",
":sel_asm($nacl_asm_toolchain)",
":nacl_error_code",
":env_cleanser",
"//native_client/src/trusted/desc:nrd_xfer",
"//native_client/src/trusted/perf_counter:nacl_perf_counter",
"//native_client/src/trusted/nacl_base:nacl_base",
"//native_client/src/shared/imc:imc",
"//native_client/src/trusted/fault_injection:nacl_fault_inject",
"//native_client/src/trusted/interval_multiset:nacl_interval",
"//native_client/src/shared/platform:platform",
"//native_client/src/trusted/platform_qualify:platform_qual_lib",
"//native_client/src/shared/gio:gio",
"//native_client/src/trusted/validator:validation_cache",
"//native_client/src/trusted/validator:validators",
]
if (current_os == "mac") {
deps += [ ":nacl_exc" ]
sources += [ "$target_gen_dir/nacl_exc_server.c" ]
}
}
if (current_os == "mac") {
import("//build/config/mac/mac_sdk.gni")
action("nacl_exc") {
script = "osx/run_mig.py"
sources = [
mac_sdk_path + "/usr/include/mach/exc.defs",
]
outputs = [
"$target_gen_dir/nacl_exc.h",
"$target_gen_dir/nacl_exc_server.c",
]
args = rebase_path(sources, root_build_dir) +
rebase_path(outputs, root_build_dir)
if (!use_system_xcode) {
args += [ hermetic_xcode_path ]
}
args += [
"--sdk",
mac_sdk_path,
]
}
}
executable("sel_ldr") {
sources = [
"nacl_test_injection_main.c",
]
deps = [
":sel_main",
"//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
]
if (is_linux) {
ldflags = [ "-pie" ]
data_deps = [
"linux:bootstrap",
]
}
}

View File

@@ -0,0 +1,177 @@
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# We use a special toolchain to build nacl_helper_bootstrap. This
# seems a bit excessive for compiling one source file. But it is
# the most reasonable way to instantiate the configs with different
# settings such as use_gold=false. The minimal set of configs used
# for that file (see below) will sometimes try to use the switch
# -gsplit-dwarf under use_gold=true. But without some other configs
# that add a -B option pointing at a custom-built binutils, on some
# builders (e.g. on older bots) Clang will fail with -gsplit-dwarf.
# Fortunately, -gsplit-dwarf is pointless for this build anyway
# since there is just one small file. And we're not actually using
# Gold for the link, so use_gold=true is a false statement and might
# cause other problems.
here = get_label_info(".", "dir")
bootstrap_toolchain = here + "/toolchain:nacl_bootstrap_" + target_cpu
compiler = "g++"
if (default_toolchain == "//build/toolchain/cros:target") {
import("//build/toolchain/cros_toolchain.gni")
bootstrap_toolchain = "//build/toolchain/cros:nacl_bootstrap"
compiler = cros_target_cxx
} else if (current_cpu == "arm" && !is_android) {
compiler = "arm-linux-gnueabihf-g++"
} else if (current_cpu == "mipsel" && !is_android) {
compiler = "mipsel-linux-gnu-g++"
}
if (current_toolchain == bootstrap_toolchain) {
bootstrap_lib_path = "$target_out_dir/libnacl_bootstrap_lib.a"
bootstrap_raw_path = "$target_out_dir/nacl_bootstrap_raw"
bootstrap_exe_path = "$root_out_dir/nacl_helper_bootstrap"
linker_script_path = rebase_path("nacl_bootstrap.x")
if (current_cpu == "x64") {
nacl_reserve_top = "0x0"
linker_emulation = "elf_x86_64"
}
if (current_cpu == "x86") {
nacl_reserve_top = "0x40000000"
linker_emulation = "elf_i386"
}
if (current_cpu == "arm") {
nacl_reserve_top = "0x40002000"
linker_emulation = "armelf_linux_eabi"
}
if (current_cpu == "mipsel") {
nacl_reserve_top = "0x40008000"
linker_emulation = "elf32ltsmip"
}
static_library("nacl_bootstrap_lib") {
# This code has very specific requirements related to its static
# linking and minimal libc use. It cannot support the normal variety
# of build configs that the rest of the code is built with. So it
# resets the list of configsto empty, and then builds up from scratch
# using only the basics that work here.
configs = []
configs += [
"//build/config/compiler:compiler_cpu_abi",
"//build/config/compiler:runtime_library",
"//build/config/compiler:chromium_code",
"//build/config/compiler:default_optimization",
"//build/config/compiler:default_symbols",
]
include_dirs = [ "//" ]
cflags = [
"-fno-builtin",
# These might be the defaults in the compiler configuration,
# but we want them all disabled for this build.
"-fno-stack-protector",
"-fno-pic",
"-fno-PIC",
"-fno-pie",
"-fno-PIE",
]
sources = [
"nacl_bootstrap.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
action("nacl_bootstrap_raw") {
deps = [
":nacl_bootstrap_lib",
]
script = "ld_bfd.py"
sources = [
bootstrap_lib_path,
linker_script_path,
]
outputs = [
bootstrap_raw_path,
]
args = [
"--compiler",
compiler,
"-m",
linker_emulation,
"--build-id",
# This program is (almost) entirely
# standalone. It has its own startup code, so
# no crt1.o for it. It is statically linked,
# and on x86 it does not use libc at all.
# However, on ARM it needs a few (safe) things
# from libc.
"-static",
# On x86-64, the default page size with some linkers is 2M
# rather than the real Linux page size of 4K. And on ARM, the
# default page size is 32K. A larger page size is
# incompatible with our custom linker script's special layout.
# NOTE: It's important that this option come before --script!
"-z",
"max-page-size=0x1000",
# Link with custom linker script for special
# layout. The script uses the symbol RESERVE_TOP.
"--defsym",
"RESERVE_TOP=" + nacl_reserve_top,
"--script=" + rebase_path(linker_script_path, root_build_dir),
"-o",
rebase_path(bootstrap_raw_path, root_build_dir),
"--whole-archive",
rebase_path(bootstrap_lib_path, root_build_dir),
"--no-whole-archive",
]
}
action("munge_nacl_helper_bootstrap") {
deps = [
":nacl_bootstrap_raw",
]
script = "nacl_bootstrap_munge_phdr.py"
inputs = [
bootstrap_raw_path,
]
outputs = [
bootstrap_exe_path,
]
args = rebase_path(inputs + outputs, root_build_dir)
}
} else if (is_linux) {
copy("bootstrap") {
bootstrap = ":munge_nacl_helper_bootstrap($bootstrap_toolchain)"
bootstrap_out_dir = get_label_info(bootstrap, "root_out_dir")
deps = [
bootstrap,
]
sources = [
"$bootstrap_out_dir/nacl_helper_bootstrap",
]
outputs = [
"$root_out_dir/nacl_helper_bootstrap",
]
}
# Mark the compiler arg as used.
compiler = compiler
}

View File

@@ -0,0 +1,38 @@
# Copyright (c) 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/gcc_toolchain.gni")
# This toolchain's sole purpose is to compile nacl_helper_bootstrap.c.
# That requires a separate toolchain because that's the most reasonable way
# to instantiate the standard configs in a context where use_gold=false
# and use_debug_fission=false when the main build is using either
# use_gold=true or use_debug_fission=true. See ../BUILD.gn for details.
template("nacl_bootstrap_toolchain") {
clang_toolchain(target_name) {
toolchain_args = {
current_cpu = invoker.toolchain_cpu
current_os = target_os
use_debug_fission = false
use_gold = false
}
}
}
nacl_bootstrap_toolchain("nacl_bootstrap_x64") {
toolchain_cpu = "x64"
}
nacl_bootstrap_toolchain("nacl_bootstrap_x86") {
toolchain_cpu = "x86"
}
nacl_bootstrap_toolchain("nacl_bootstrap_arm") {
toolchain_cpu = "arm"
}
nacl_bootstrap_toolchain("nacl_bootstrap_mipsel") {
toolchain_cpu = "mipsel"
}

View File

@@ -0,0 +1,35 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("validators") {
sources = [
"validator_init.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
if (current_cpu == "arm") {
deps += [ "//native_client/src/trusted/validator_arm:ncvalidate_arm_v2" ]
}
if (current_cpu == "mipsel") {
deps += [ "//native_client/src/trusted/validator_mips:ncvalidate_mips" ]
}
if (current_cpu == "x86") {
deps += [ "//native_client/src/trusted/validator_ragel:dfa_validate" ]
}
if (current_cpu == "x64") {
deps += [ "//native_client/src/trusted/validator_ragel:dfa_validate" ]
}
}
static_library("validation_cache") {
sources = [
"validation_cache.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}

View File

@@ -0,0 +1,37 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Autogenerated from src/trusted/validator/driver/build.scons.
static_library("elf_load") {
sources = [
"elf_load.cc",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/platform:platform",
]
}
executable("ncval_new") {
sources = [
"ncval.cc",
]
deps = [
"//build/config/nacl:nacl_base",
# All executables must have the sanitizer deps to properly link in
# asan mode (this target will be empty in other cases).
"//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
":elf_load",
"//native_client/src/shared/platform:platform",
"//native_client/src/trusted/cpu_features:cpu_features",
"//native_client/src/trusted/validator_arm:arm_validator_core",
"//native_client/src/trusted/validator_arm:arm_validator_reporters",
"//native_client/src/trusted/validator_ragel:rdfa_validator",
]
}

View File

@@ -0,0 +1,42 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Generated from GYP
static_library("arm_validator_core") {
sources = [
"address_set.cc",
"inst_classes.cc",
"model.cc",
"arm_helpers.cc",
"validator.cc",
"gen/arm32_decode.cc",
"gen/arm32_decode_actuals_1.cc",
"gen/arm32_decode_actuals_2.cc",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/trusted/cpu_features:cpu_features",
]
}
static_library("ncvalidate_arm_v2") {
sources = [
"ncvalidate.cc",
]
deps = [
"//build/config/nacl:nacl_base",
":arm_validator_core",
"//native_client/src/trusted/validator:validation_cache",
]
}
static_library("arm_validator_reporters") {
sources = [
"problem_reporter.cc",
]
deps = [
"//build/config/nacl:nacl_base",
]
}

View File

@@ -0,0 +1,46 @@
# Copyright (c) 2016 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("mips_validator_core") {
sources = [
"address_set.cc",
"validator.cc",
"$target_gen_dir/decode.cc",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/trusted/cpu_features:cpu_features",
":decode_gen"
]
}
action("decode_gen") {
script = "dgen/generate_decoder.py"
outputs = [
"$target_gen_dir/decode.cc",
]
sources = [
"mips-opt.table",
]
inputs = [
"dgen/generate_decoder.py",
"dgen/dgen_core.py",
"dgen/dgen_input.py",
"dgen/dgen_opt.py",
"dgen/dgen_output.py",
]
args = rebase_path(sources, root_build_dir) +
rebase_path(outputs, root_build_dir)
}
static_library("ncvalidate_mips") {
sources = [
"ncvalidate.cc",
]
deps = [
"//build/config/nacl:nacl_base",
":mips_validator_core",
]
}

View File

@@ -0,0 +1,50 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# These objects are included in both dfa_validate_x86_xx and rdfa_validator
# libraries, so we have to introduce intermediate scons nodes.
validator32 = "gen/validator_x86_32.c"
validator64 = "gen/validator_x86_64.c"
if (current_cpu == "x86" || current_cpu == "x64") {
static_library("dfa_validate") {
sources = [
"validator_features_all.c",
"validator_features_validator.c",
"dfa_validate_common.c",
]
if (current_cpu == "x86") {
sources += [
validator32,
"dfa_validate_32.c",
]
} else {
sources += [
validator64,
"dfa_validate_64.c",
]
}
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/trusted/cpu_features:cpu_features",
"//native_client/src/trusted/validator:validation_cache",
"//native_client/src/trusted/validator_x86:nccopy",
]
}
}
# Low-level platform-independent interface supporting both 32 and 64 bit,
# used in ncval and in validator_benchmark.
static_library("rdfa_validator") {
sources = [
validator32,
validator64,
"validator_features_all.c",
"validator_features_validator.c",
]
defines = [ "VALIDATOR_EXPORT=DLLEXPORT" ]
deps = [
"//build/config/nacl:nacl_base",
]
}

View File

@@ -0,0 +1,28 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//native_client/src/trusted/asm.gni")
if (current_cpu == "x86" || current_cpu == "x64") {
if (current_toolchain == nacl_asm_toolchain) {
source_set("nccopy_asm") {
sources = [
"nccopycode_stores.S",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
}
source_set("nccopy") {
sources = [
"nccopycode.c",
]
deps = [
"//build/config/nacl:nacl_base",
":nccopy_asm($nacl_asm_toolchain)",
]
}
}

View File

@@ -0,0 +1,77 @@
# Copyright (c) 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/toolchain.gni")
# This is a special toolchain used solely for building GNU/AT&T-syntax
# assembly files on Windows. See src/trusted/asm.gni for more details.
tool_wrapper_path =
rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir)
template("nacl_win_as_toolchain") {
toolchain(target_name) {
tool("asm") {
# For GCC we can just use the C compiler to compile assembly.
win_as_script =
rebase_path("//native_client/tools/win_as.py", root_build_dir)
if (invoker.toolchain_cpu == "x86") {
env = "environment.x86"
win_as_arch = "Win32"
} else {
env = "environment.x64"
win_as_arch = invoker.toolchain_cpu
}
top_srcdir = rebase_path("//", root_build_dir)
rspfile = "{{output}}.rsp"
rspfile_content = "$python_path $win_as_script -a $win_as_arch -p $top_srcdir -o {{output}} {{source}}"
command = "$python_path $tool_wrapper_path action-wrapper $env $rspfile"
depsformat = "msvc"
description = "GNU ASM {{output}}"
outputs = [
"{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj",
]
}
# These two are really entirely generic, but have to be repeated in
# each toolchain because GN doesn't allow a template to be used here.
# See //build/toolchain/toolchain.gni for details.
tool("stamp") {
command = stamp_command
description = stamp_description
}
tool("copy") {
command = copy_command
description = copy_description
}
# This is necessary so that certain .gn files with static_libraries (e.g.
# //build/config/sanitizers/BUILD.gn) can be loaded in the context of this
# toolchain.
tool("alink") {
command = "fake"
outputs = [
"fake",
]
}
toolchain_args = {
current_os = "win"
current_cpu = invoker.toolchain_cpu
# These values need to be passed through unchanged.
host_toolchain = host_toolchain
target_os = target_os
target_cpu = target_cpu
}
}
}
nacl_win_as_toolchain("nacl_win_as_x86") {
toolchain_cpu = "x86"
}
nacl_win_as_toolchain("nacl_win_as_x64") {
toolchain_cpu = "x64"
}

View File

@@ -0,0 +1,42 @@
# Copyright (c) 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(current_os == "nacl", "This file contains untrusted code only.")
import("//build/config/nacl/config.gni")
if (current_cpu != "pnacl" && !is_nacl_glibc) {
executable("elf_loader") {
sources = [
"elf_loader.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}
}
if (is_nacl_glibc) {
# The elf_loader nexe can only be built with the newlib toolchain,
# but it's needed for things built in the glibc toolchain. To
# keep things simpler for users of it, copy it into the glibc
# $root_out_dir and give it the name used in GYP (and expected by
# the SDK's create_nmf.py): elf_loader_<CPU>.nexe.
copy("elf_loader") {
here = get_label_info(".", "dir")
newlib_tc = "//build/toolchain/nacl:clang_newlib_" + current_cpu
elf_loader_label = here + ":elf_loader" + "(" + newlib_tc + ")"
newlib_out_dir = get_label_info(elf_loader_label, "root_out_dir")
deps = [
elf_loader_label,
]
sources = [
newlib_out_dir + "/elf_loader.nexe",
]
outputs = [
"$root_out_dir/elf_loader_" + current_cpu + ".nexe",
]
}
}

View File

@@ -0,0 +1,61 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
executable("irt_core") {
cflags_c = [ "-std=gnu99" ]
sources = [
"irt_core_resource.c",
"irt_entry_core.c",
"irt_pnacl_translator_common.c",
"irt_pnacl_translator_compile.c",
"irt_pnacl_translator_link.c",
]
deps = [
"//build/config/nacl:nacl_base",
":irt_core_lib",
]
}
static_library("irt_core_lib") {
cflags_c = [ "-std=c99" ]
sources = [
"../../untrusted/pthread/nc_condvar.c",
"../../untrusted/pthread/nc_mutex.c",
"../../untrusted/nacl/sys_private.c",
"../../untrusted/valgrind/dynamic_annotations.c",
"irt_basic.c",
"irt_blockhook.c",
"irt_clock.c",
"irt_code_data_alloc.c",
"irt_cond.c",
"irt_dev_getpid.c",
"irt_dev_list_mappings.c",
"irt_dyncode.c",
"irt_entry.c",
"irt_exception_handling.c",
"irt_fdio.c",
"irt_filename.c",
"irt_futex.c",
"irt_interfaces.c",
"irt_malloc.c",
"irt_memory.c",
"irt_mutex.c",
"irt_private_pthread.c",
"irt_private_tls.c",
"irt_query_list.c",
"irt_random.c",
"irt_sem.c",
"irt_thread.c",
"irt_tls.c",
]
deps = [
"//build/config/nacl:nacl_base",
"//native_client/src/shared/gio:gio",
"//native_client/src/shared/platform:platform",
"//native_client/src/untrusted/nacl:imc_syscalls",
]
}

View File

@@ -0,0 +1,449 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(current_os == "nacl", "This file contains untrusted code only.")
static_library("nacl_dyncode_private") {
cflags_c = []
sources = [
"dyncode_private.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_random_private") {
cflags_c = []
sources = [
"irt_random",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_sys_private") {
cflags_c = []
sources = [
"null.c",
"sysbrk.c",
]
if (current_os != "glibc") {
sources += [
"None",
"private_blockhook",
]
}
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("imc_syscalls") {
cflags_c = []
sources = [
"imc_accept.c",
"imc_connect.c",
"imc_makeboundsock.c",
"imc_mem_obj_create.c",
"imc_recvmsg.c",
"imc_sendmsg.c",
"imc_socketpair.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_exception_private") {
cflags_c = []
sources = [
"nacl_exception_private.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_list_mappings_private") {
cflags_c = []
sources = [
"list_mappings_private.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_dyncode") {
cflags_c = []
sources = [
"dyncode.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl") {
cflags_c = [ "-std=c99" ]
sources = [
"gc_hooks.c",
"nacl_irt.c",
"nacl_irt_init.c",
"nacl_random.c",
"nacl_tls_get.c",
"nacl_tls_init.c",
]
if (current_os != "glibc") {
sources += [
"_exit.c",
"abort.c",
"access.c",
"chdir.c",
"chmod.c",
"clock.c",
"clock_getres.c",
"clock_gettime.c",
"close.c",
"dup.c",
"eaccess.c",
"fchdir.c",
"fchmod.c",
"fdatasync.c",
"fstat.c",
"fsync.c",
"ftruncate.c",
"getcwd.c",
"getcwd_without_malloc.c",
"getdents.c",
"gethostname.c",
"getpagesize.c",
"getpid.c",
"gettimeofday.c",
"htonl.c",
"htons.c",
"isatty.c",
"link.c",
"lock.c",
"lseek.c",
"lstat.c",
"malloc.c",
"mkdir.c",
"mmap.c",
"mprotect.c",
"munmap.c",
"nacl_add_tp.c",
"nacl_ext_supply.c",
"nacl_interface_query.c",
"nacl_irt_fdio.c",
"nacl_irt_filename.c",
"nacl_read_tp.c",
"nanosleep.c",
"ntohl.c",
"ntohs.c",
"open.c",
"pthread_initialize_minimal.c",
"pthread_stubs.c",
"random.c",
"read.c",
"readlink.c",
"rename.c",
"rmdir.c",
"sbrk.c",
"sched_yield.c",
"sigblock.c",
"siggetmask.c",
"sigmask.c",
"sigprocmask.c",
"sigsetmask.c",
"srandom.c",
"stacktrace.c",
"start.c",
"stat.c",
"stubs/_execve.c",
"stubs/accept.c",
"stubs/addmntent.c",
"stubs/bind.c",
"stubs/chown.c",
"stubs/closelog.c",
"stubs/connect.c",
"stubs/endgrent.c",
"stubs/endmntent.c",
"stubs/endpwent.c",
"stubs/environ.c",
"stubs/execvpe.c",
"stubs/fchown.c",
"stubs/fcntl.c",
"stubs/fork.c",
"stubs/freeaddrinfo.c",
"stubs/fstatvfs.c",
"stubs/gai_strerror.c",
"stubs/get_current_dir_name.c",
"stubs/getaddrinfo.c",
"stubs/getdtablesize.c",
"stubs/getegid.c",
"stubs/geteuid.c",
"stubs/getgid.c",
"stubs/getgrent.c",
"stubs/getgrgid.c",
"stubs/getgrgid_r.c",
"stubs/getgrnam.c",
"stubs/getgroups.c",
"stubs/gethostbyaddr.c",
"stubs/gethostbyname.c",
"stubs/getlogin.c",
"stubs/getmntent.c",
"stubs/getnameinfo.c",
"stubs/getpeername.c",
"stubs/getpgrp.c",
"stubs/getppid.c",
"stubs/getpwent.c",
"stubs/getpwnam.c",
"stubs/getpwnam_r.c",
"stubs/getpwuid.c",
"stubs/getpwuid_r.c",
"stubs/getrlimit.c",
"stubs/getrusage.c",
"stubs/getservbyname.c",
"stubs/getservbyport.c",
"stubs/getsockname.c",
"stubs/getsockopt.c",
"stubs/getuid.c",
"stubs/getwd.c",
"stubs/hasmntopt.c",
"stubs/if_freenameindex.c",
"stubs/if_indextoname.c",
"stubs/if_nameindex.c",
"stubs/if_nametoindex.c",
"stubs/inet_ntoa.c",
"stubs/inet_ntop.c",
"stubs/initgroups.c",
"stubs/ioctl.c",
"stubs/issetugid.c",
"stubs/kill.c",
"stubs/lchown.c",
"stubs/listen.c",
"stubs/llseek.c",
"stubs/major.c",
"stubs/makedev.c",
"stubs/minor.c",
"stubs/mkfifo.c",
"stubs/mknod.c",
"stubs/msync.c",
"stubs/openlog.c",
"stubs/pipe.c",
"stubs/poll.c",
"stubs/pselect.c",
"stubs/pthread_sigmask.c",
"stubs/readv.c",
"stubs/recv.c",
"stubs/recvfrom.c",
"stubs/recvmsg.c",
"stubs/sched_get_priority_max.c",
"stubs/sched_get_priority_min.c",
"stubs/sched_setparam.c",
"stubs/sched_setscheduler.c",
"stubs/select.c",
"stubs/send.c",
"stubs/sendmsg.c",
"stubs/sendto.c",
"stubs/setegid.c",
"stubs/seteuid.c",
"stubs/setgid.c",
"stubs/setgrent.c",
"stubs/setgroups.c",
"stubs/setmntent.c",
"stubs/setpgid.c",
"stubs/setpwent.c",
"stubs/setrlimit.c",
"stubs/setsid.c",
"stubs/setsockopt.c",
"stubs/settimeofday.c",
"stubs/setuid.c",
"stubs/shutdown.c",
"stubs/sigaction.c",
"stubs/signal.c",
"stubs/sigsuspend.c",
"stubs/sigvec.c",
"stubs/socket.c",
"stubs/socketpair.c",
"stubs/statvfs.c",
"stubs/syslog.c",
"stubs/tcdrain.c",
"stubs/tcflow.c",
"stubs/tcflush.c",
"stubs/tcgetattr.c",
"stubs/tcsendbreak.c",
"stubs/tcsetattr.c",
"stubs/times.c",
"stubs/ttyname.c",
"stubs/ttyname_r.c",
"stubs/umask.c",
"stubs/vfork.c",
"stubs/wait.c",
"stubs/waitpid.c",
"symlink.c",
"sysconf.c",
"tls.c",
"truncate.c",
"uname.c",
"unlink.c",
"utime.c",
"utimes.c",
"write.c",
]
}
if (current_os != "glibc" && current_cpu == "arm") {
sources += [ "aeabi_read_tp.S" ]
}
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
source_set("irt_random") {
cflags_c = []
sources = [
"../../untrusted/irt/irt_random.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_exception") {
cflags_c = []
sources = [
"nacl_exception.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
static_library("nacl_list_mappings") {
cflags_c = []
sources = [
"list_mappings.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
if (current_os != "glibc") {
source_set("sys_private") {
cflags_c = []
sources = [
"sys_private.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
source_set("gc_hooks_private") {
cflags_c = []
sources = [
"gc_hooks_private.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
source_set("private_blockhook") {
cflags_c = []
sources = [
"../../untrusted/irt/irt_blockhook.c",
]
if (current_cpu == "pnacl") {
cflags_c += [
"-Wno-self-assign",
]
}
deps = [
"//build/config/nacl:nacl_base",
]
}
}

View File

@@ -0,0 +1,20 @@
# Copyright (c) 2014 The Native ClientAuthors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("pthread") {
cflags_c = [ "-std=c99" ]
sources = [
"nc_thread.c",
"nc_mutex.c",
"nc_condvar.c",
"nc_rwlock.c",
"nc_semaphore.c",
"nc_init_irt.c",
"stack_end.c",
"../valgrind/dynamic_annotations.c",
]
deps = [
"//build/config/nacl:nacl_base",
]
}