Commit 92b4d574 authored by sbc's avatar sbc Committed by Commit bot

Reland of [NaCl SDK] Add initial support for building the SDK with gn...

Reland of [NaCl SDK] Add initial support for building the SDK with gn (patchset #1 id:1 of https://codereview.chromium.org/1693213002/ )

Reason for revert:
clang/win compile failures was fixed:
https://codereview.chromium.org/1706613002

CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_clang_x64_dbg

Original issue's description:
> Revert of [NaCl SDK] Add initial support for building the SDK with gn (patchset #6 id:100001 of https://codereview.chromium.org/1693053002/ )
>
> Reason for revert:
> Doesn't build with clang/win and looks nontrivial to fix:
>
> https://build.chromium.org/p/chromium.fyi/builders/CrWinClang64%28dbg%29/builds/3655/steps/compile/logs/stdio
>
> FAILED: ninja -t msvc -e environment.x64 -- E:\b\build\goma/gomacc.exe ../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes /FC @obj/native_client/src/trusted/validator/driver/ncval_new/ncval.obj.rsp /c ../../native_client/src/trusted/validator/driver/ncval.cc /Foobj/native_client/src/trusted/validator/driver/ncval_new/ncval.obj /Fdobj/native_client/src/trusted/validator/driver/ncval_new_cc.pdb
> ../../native_client/src/trusted/validator/driver/ncval.cc(359,36) :  error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings]
>   while ((opt = getopt(argc, argv, "vd")) != -1) {
>                                    ^
>
> (and i'm guessing several more)
>
> Original issue's description:
> > [NaCl SDK] Add initial support for building the SDK with gn
> >
> > build_sdk.py still uses gyp.  I have a followup CL to
> > convert that to gn.
> >
> > BUG=585999
>
> TBR=binji@chromium.org,dpranke@chromium.org,bradnelson@chromium.org,sbc@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=585999
>
> Committed: https://crrev.com/b78379a22336ce66dac20778db7964e40faa9180
> Cr-Commit-Position: refs/heads/master@{#375349}

TBR=binji@chromium.org,dpranke@chromium.org,bradnelson@chromium.org,thakis@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=585999

Review URL: https://codereview.chromium.org/1705923002

Cr-Commit-Position: refs/heads/master@{#376080}
parent 1002bde3
......@@ -720,9 +720,6 @@ group("gn_only") {
"//third_party/libjpeg_turbo:simd_asm",
]
}
if (enable_nacl) {
deps += [ "//native_client/src/trusted/service_runtime:sel_ldr" ]
}
if (use_ozone) {
deps += [ "//ui/ozone/demo" ]
}
......@@ -732,6 +729,10 @@ group("gn_only") {
}
}
if (enable_nacl) {
deps += [ "//native_client_sdk/src:nacl_core_sdk" ]
}
if (is_android) {
deps += [
"//build/android/gyp/test:hello_world",
......
# Copyright 2016 The Chromium 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/config/features.gni")
declare_args() {
# Set to true if cross compiling trusted (e.g. building sel_ldr_arm on x86)
# binaries is supported.
enable_cross_trusted = is_linux
# Build the nacl SDK untrusted components. This is disabled by default since
# not all NaCl untrusted compilers are in goma (e.g arm-nacl-glibc)
nacl_sdk_untrusted = false
}
if (enable_nacl) {
group("nacl_core_sdk") {
# Targets that get included in the NaCl SDK
# See: native_client_sdk/src/build_tools/build_sdk.py
deps = []
if (enable_cross_trusted ||
(target_cpu != "arm" && target_cpu != "mipsel")) {
# cross compiling trusted binaries such as sel_ldr is only currently
# supported on linux, and requires specific cross compilers to be
# installed. It can be disabled with 'disable_cross_trusted=1'
deps = [
"//native_client/src/trusted/service_runtime:sel_ldr",
"//native_client/src/trusted/validator/driver:ncval_new",
]
if (is_linux) {
deps += [ "//native_client/src/nonsfi/loader:nonsfi_loader" ]
}
}
if (nacl_sdk_untrusted) {
deps += [
# elf_loader is only used on ARM
"//native_client/src/untrusted/elf_loader:elf_loader(//build/toolchain/nacl:clang_newlib_arm)",
"//native_client/src/untrusted/irt:irt_core(//build/toolchain/nacl:irt_arm)",
"//native_client/src/untrusted/irt:irt_core(//build/toolchain/nacl:irt_x64)",
"//native_client/src/untrusted/irt:irt_core(//build/toolchain/nacl:irt_x86)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:clang_newlib_arm)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:clang_newlib_x64)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:clang_newlib_x86)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:glibc_arm)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:glibc_x64)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:glibc_x86)",
"//ppapi/native_client:ppapi_lib(//build/toolchain/nacl:newlib_pnacl)",
"//ppapi/native_client/src/untrusted/pnacl_irt_shim:aot(//build/toolchain/nacl:clang_newlib_arm)",
"//ppapi/native_client/src/untrusted/pnacl_irt_shim:aot(//build/toolchain/nacl:clang_newlib_x64)",
"//ppapi/native_client/src/untrusted/pnacl_irt_shim:aot(//build/toolchain/nacl:clang_newlib_x86)",
]
}
# TODO(binji): dump_syms doesn't currently build on Windows. See
# http://crbug.com/245456
if (!is_win && target_cpu == "x64") {
deps += [
"//breakpad:dump_syms($host_toolchain)",
"//breakpad:minidump_dump($host_toolchain)",
"//breakpad:minidump_stackwalk($host_toolchain)",
]
}
}
}
......@@ -6,6 +6,8 @@ assert(is_nacl,
"These targets must only be built using the untrusted NaCl toolchains.")
static_library("ppapi_stub_lib") {
output_name = "ppapi_stub"
# This library is distributed as a part of the SDK and as such has to
# be a static library rather than a source set.
sources = [
......@@ -14,6 +16,7 @@ static_library("ppapi_stub_lib") {
"ppapi_plugin_start.c",
"thread_creator.c",
]
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
cflags = [ "-fPIC" ]
deps = [
"//build/config/nacl:nacl_base",
......
......@@ -4,6 +4,8 @@
* found in the LICENSE file.
*/
#include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h"
#include "ppapi/native_client/src/untrusted/irt_stub/ppapi_start.h"
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment