Stop setting is_posix for Fuchsia.
This sets is_posix to false for the Fuchsia build as it will rely less and less on the POSIX implementation. Follow-up CLs will clean up build files from redundant checks and stop including _posix files by default. Bug: 812974 Change-Id: I6dc625ba2d4919a775041b1516e051b471c50e97 Reviewed-on: https://chromium-review.googlesource.com/987377 Commit-Queue: Fabrice de Gans-Riberi <fdegans@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Scott Graham <scottmg@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#550292} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 9fba3affd0a3246f2ec851c5f83cc3588a379086
This commit is contained in:
Родитель
b95dec44e1
Коммит
19a9832197
|
@ -349,7 +349,7 @@ if (current_os == "win" || current_os == "winuwp") {
|
|||
is_linux = false
|
||||
is_mac = false
|
||||
is_nacl = false
|
||||
is_posix = true
|
||||
is_posix = false
|
||||
is_win = false
|
||||
} else if (current_os == "ios") {
|
||||
is_android = false
|
||||
|
@ -400,7 +400,9 @@ if (current_os == "win" || current_os == "winuwp") {
|
|||
# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call
|
||||
# below.
|
||||
sources_assignment_filter = []
|
||||
if (!is_posix) {
|
||||
|
||||
# TODO(crbug.com/812974): Clean up _posix files and remove Fuchsia here.
|
||||
if (!is_posix && !is_fuchsia) {
|
||||
sources_assignment_filter += [
|
||||
"*_posix.h",
|
||||
"*_posix.cc",
|
||||
|
@ -557,6 +559,10 @@ if (is_posix) {
|
|||
}
|
||||
}
|
||||
|
||||
if (is_fuchsia) {
|
||||
default_compiler_configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
default_compiler_configs +=
|
||||
[ "//build/config/android:default_cygprofile_instrumentation" ]
|
||||
|
|
|
@ -145,12 +145,12 @@ declare_args() {
|
|||
# other architectures.
|
||||
#
|
||||
# lld doesn't have the bug.
|
||||
use_icf =
|
||||
is_posix && !using_sanitizer && !(is_android && use_order_profiling) &&
|
||||
((use_lld && !is_nacl) ||
|
||||
(use_gold &&
|
||||
((!is_android && linux_use_bundled_binutils) || is_chromeos ||
|
||||
!(current_cpu == "x86" || current_cpu == "x64"))))
|
||||
use_icf = (is_posix || is_fuchsia) && !using_sanitizer &&
|
||||
!(is_android && use_order_profiling) &&
|
||||
((use_lld && !is_nacl) ||
|
||||
(use_gold &&
|
||||
((!is_android && linux_use_bundled_binutils) || is_chromeos ||
|
||||
!(current_cpu == "x86" || current_cpu == "x64"))))
|
||||
}
|
||||
|
||||
# Apply the default logic for these values if they were not set explicitly.
|
||||
|
@ -253,7 +253,7 @@ config("compiler") {
|
|||
} else {
|
||||
cflags += [ "-fstack-protector" ]
|
||||
}
|
||||
} else if (is_posix && !is_chromeos && !is_nacl) {
|
||||
} else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
|
||||
# TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
|
||||
# See also https://crbug.com/533294
|
||||
cflags += [ "--param=ssp-buffer-size=4" ]
|
||||
|
@ -308,9 +308,9 @@ config("compiler") {
|
|||
]
|
||||
}
|
||||
|
||||
# Non-Mac Posix compiler flags setup.
|
||||
# Non-Mac Posix and Fuchsia compiler flags setup.
|
||||
# -----------------------------------
|
||||
if (is_posix && !(is_mac || is_ios)) {
|
||||
if ((is_posix && !(is_mac || is_ios)) || is_fuchsia) {
|
||||
if (enable_profiling) {
|
||||
if (!is_debug) {
|
||||
cflags += [ "-g" ]
|
||||
|
@ -358,7 +358,7 @@ config("compiler") {
|
|||
}
|
||||
}
|
||||
|
||||
# Linux/Android common flags setup.
|
||||
# Linux/Android/Fuchsia common flags setup.
|
||||
# ---------------------------------
|
||||
if (is_linux || is_android || is_fuchsia) {
|
||||
if (use_pic) {
|
||||
|
@ -402,7 +402,7 @@ config("compiler") {
|
|||
ldflags += [ "--gcc-toolchain=$_rebased_android_toolchain_root" ]
|
||||
}
|
||||
|
||||
if (is_posix && use_lld && !is_nacl) {
|
||||
if ((is_posix || is_fuchsia) && use_lld && !is_nacl) {
|
||||
ldflags += [ "-fuse-ld=lld" ]
|
||||
if (current_cpu == "arm64") {
|
||||
# Reduce the page size from 65536 in order to reduce binary size slightly
|
||||
|
@ -658,7 +658,7 @@ config("compiler") {
|
|||
# Assign any flags set for the C compiler to asmflags so that they are sent
|
||||
# to the assembler. The Windows assembler takes different types of flags
|
||||
# so only do so for posix platforms.
|
||||
if (is_posix) {
|
||||
if (is_posix || is_fuchsia) {
|
||||
asmflags += cflags
|
||||
asmflags += cflags_c
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ config("compiler_cpu_abi") {
|
|||
ldflags = []
|
||||
defines = []
|
||||
|
||||
if (is_posix && !(is_mac || is_ios)) {
|
||||
if ((is_posix && !(is_mac || is_ios)) || is_fuchsia) {
|
||||
# CPU architecture. We may or may not be doing a cross compile now, so for
|
||||
# simplicity we always explicitly set the architecture.
|
||||
if (current_cpu == "x64") {
|
||||
|
@ -1126,7 +1126,9 @@ config("runtime_library") {
|
|||
configs += [ "//build/config/android:runtime_library" ]
|
||||
}
|
||||
|
||||
if (is_posix) {
|
||||
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
|
||||
# configuration.
|
||||
if (is_posix || is_fuchsia) {
|
||||
configs += [ "//build/config/posix:runtime_library" ]
|
||||
}
|
||||
|
||||
|
@ -1561,7 +1563,7 @@ config("no_rtti") {
|
|||
# 2. Remove the thin_archive config, so that the .a file actually contains all
|
||||
# .o files, instead of just references to .o files in the build directoy
|
||||
config("thin_archive") {
|
||||
if (is_posix && !is_nacl) {
|
||||
if ((is_posix && !is_nacl) || is_fuchsia) {
|
||||
# TODO(thomasanderson): Enable on ChromeOS builds once
|
||||
# https://crbug.com/829956 is fixed.
|
||||
if (default_toolchain != "//build/toolchain/cros:target") {
|
||||
|
@ -1759,7 +1761,7 @@ if (is_win) {
|
|||
}
|
||||
|
||||
config("default_stack_frames") {
|
||||
if (is_posix) {
|
||||
if (is_posix || is_fuchsia) {
|
||||
if (enable_frame_pointers) {
|
||||
cflags = [ "-fno-omit-frame-pointer" ]
|
||||
} else {
|
||||
|
|
|
@ -7,7 +7,7 @@ import("//build/config/fuchsia/rules.gni")
|
|||
import("//build/config/sysroot.gni")
|
||||
|
||||
assert(is_fuchsia)
|
||||
assert(is_posix)
|
||||
assert(!is_posix)
|
||||
|
||||
config("compiler") {
|
||||
sdk_version_file = rebase_path("$fuchsia_sdk/.hash")
|
||||
|
|
|
@ -9,7 +9,9 @@ import("//build/config/sanitizers/sanitizers.gni")
|
|||
import("//build/config/sysroot.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
assert(is_posix)
|
||||
# TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
|
||||
# configuration.
|
||||
assert(is_posix || is_fuchsia)
|
||||
|
||||
group("posix") {
|
||||
visibility = [ "//:optimize_gn_gen" ]
|
||||
|
|
|
@ -170,7 +170,7 @@ config("default_sanitizer_ldflags") {
|
|||
":deps",
|
||||
]
|
||||
|
||||
if (is_posix) {
|
||||
if (is_posix || is_fuchsia) {
|
||||
ldflags = []
|
||||
if (is_asan) {
|
||||
ldflags += [ "-fsanitize=address" ]
|
||||
|
|
|
@ -77,7 +77,7 @@ if (is_mac || is_ios) {
|
|||
# By appending .cr, we prevent name collisions with libraries already
|
||||
# loaded by the Android zygote.
|
||||
shlib_extension = ".cr.so"
|
||||
} else if (is_posix) {
|
||||
} else if (is_posix || is_fuchsia) {
|
||||
shlib_extension = ".so"
|
||||
} else if (is_win) {
|
||||
shlib_extension = ".dll"
|
||||
|
@ -86,7 +86,7 @@ if (is_mac || is_ios) {
|
|||
}
|
||||
|
||||
# Prefix for shared library files.
|
||||
if (is_posix) {
|
||||
if (is_posix || is_fuchsia) {
|
||||
shlib_prefix = "lib"
|
||||
} else {
|
||||
shlib_prefix = ""
|
||||
|
|
Загрузка…
Ссылка в новой задаче