Build PPAPI NaCl Glibc tests with GN

Support building PPAPI NaCl tests with GCC/Glibc-based toolchain.

BUG=462791

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

Cr-Original-Commit-Position: refs/heads/master@{#350467}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 70a330fb376e614a401e738f6e7442674b0052bd
This commit is contained in:
phosek 2015-09-23 20:23:22 -07:00 коммит произвёл Commit bot
Родитель 85865c21da
Коммит 5d6c4d3c61
4 изменённых файлов: 18 добавлений и 0 удалений

10
config/nacl/config.gni Normal file
Просмотреть файл

@ -0,0 +1,10 @@
# Copyright 2015 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.
declare_args() {
# Native Client supports both Newlib and Glibc C libraries where Newlib
# is assumed to be the default one; use this to determine whether Glibc
# is being used instead.
is_nacl_glibc = false
}

Просмотреть файл

@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/nacl/config.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/toolchain/toolchain.gni")
@ -70,6 +71,8 @@ concurrent_links = exec_script("get_concurrent_links.py", [], "value")
# Whether to forcibly enable or disable component builds for this
# toolchain; if not specified, the toolchain will inherit the
# default setting.
# - is_nacl_glibc
# Whether NaCl code is built using Glibc instead of Newlib.
template("gcc_toolchain") {
toolchain(target_name) {
assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value")
@ -320,6 +323,7 @@ template("gcc_toolchain") {
[
"is_clang",
"is_component_build",
"is_nacl_glibc",
])
if (defined(invoker.clear_sanitizers) && invoker.clear_sanitizers) {

Просмотреть файл

@ -50,6 +50,7 @@ nacl_toolchain("glibc_x86") {
toolchain_cpu = "x86"
toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-"
is_clang = false
is_nacl_glibc = true
cc = toolprefix + "gcc"
cxx = toolprefix + "g++"
@ -63,6 +64,7 @@ nacl_toolchain("glibc_x64") {
toolchain_cpu = "x64"
toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-"
is_clang = false
is_nacl_glibc = true
cc = toolprefix + "gcc"
cxx = toolprefix + "g++"

Просмотреть файл

@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/nacl/config.gni")
import("//build/toolchain/gcc_toolchain.gni")
# This template defines a NaCl toolchain.
@ -38,6 +39,7 @@ template("nacl_toolchain") {
"cxx",
"deps",
"is_clang",
"is_nacl_glibc",
"ld",
"link_outputs",
"postlink",