# to configure warnings.
is_clang = false
- # ASH is enabled.
- # TODO(brettw) this should be moved out of the main build config file.
- use_ash = false
- # Aura is enabled.
- # TODO(brettw) this should be moved out of the main build config file.
- use_aura = false
- # Ozone is enabled.
- # TODO(brettw) this should be moved out of the main build config file.
- use_ozone = false
-
# Forces a 64-bit build on Windows. Does nothing on other platforms. Normally
# we build 32-bit on Windows regardless of the current host OS bit depth.
# Setting this flag will override this logic and generate 64-bit toolchains.
# When running in gyp-generating mode, this is the root of the build tree.
gyp_output_dir = "out"
+
+ # When running in gyp-generating mode, this flag indicates if the current GYP
+ # generator is xcode. Can only be true when building for iOS).
+ is_gyp_xcode_generator = false
}
# =============================================================================
# - is_mac is set only for desktop Mac. It is not set on iOS.
# - is_posix is true for mac and any Unix-like system (basically everything
# except Windows).
-# - is_linux is true for any Linux variant including Android and ChromeOS.
+# - is_linux is true for desktop Linux and ChromeOS, but not Android (which is
+# generally too different despite being based on the Linux kernel).
#
# Do not add more is_* variants here for random lesser-used Unix systems like
# aix or one of the BSDs. If you need to check these, just check the os value
is_nacl = false
is_posix = false
is_win = true
-
- # Windows currelty implies Aura.
- use_aura = true
} else if (os == "mac") {
is_android = false
is_chromeos = false
is_android = true
is_chromeos = false
is_ios = false
- is_linux = true
+ is_linux = false
is_mac = false
is_nacl = false
is_posix = true
is_nacl = false
is_posix = true
is_win = false
- if (!is_clang) {
+ if (!is_gyp_xcode_generator) {
# Always use clang on iOS when using ninja
- # (which is always true when using GN).
is_clang = true
}
} else if (os == "linux") {
is_clang = true
}
-toolkit_uses_gtk = is_linux
-
# =============================================================================
# TARGET DEFAULTS
# =============================================================================
# Holds all configs used for making native executables and libraries, to avoid
# duplication in each target below.
native_compiler_configs = [
- "//build/config:my_msvs", # TODO(brettw) eraseme
+ "//build/config:feature_flags",
"//build/config/compiler:compiler",
"//build/config/compiler:chromium_code",
"//build/config/compiler:runtime_library",
]
if (is_win) {
- native_compiler_configs += [
- "//build/config/win:sdk",
- ]
-} else if (is_clang) {
+ native_compiler_configs += [ "//build/config/win:sdk", ]
+} else if (is_linux) {
+ native_compiler_configs += [ "//build/config/linux:sdk", ]
+} else if (is_mac) {
+ native_compiler_configs += [ "//build/config/mac:sdk", ]
+} else if (is_ios) {
+ native_compiler_configs += [ "//build/config/ios:sdk", ]
+}
+if (is_clang) {
native_compiler_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
set_defaults("executable") {
- configs = native_compiler_configs
+ configs = native_compiler_configs + [
+ "//build/config:default_libs",
+ ]
if (is_win) {
configs += windows_linker_configs
} else if (is_mac) {
configs += [ "//build/config/mac:mac_dynamic_flags" ]
- } else if (is_linux) {
+ } else if (is_linux || is_android) {
configs += [ "//build/config/linux:executable_ldconfig" ]
}
}
}
set_defaults("shared_library") {
- configs = native_compiler_configs
+ configs = native_compiler_configs + [
+ "//build/config:default_libs",
+ ]
if (is_win) {
configs += windows_linker_configs
} else if (is_mac) {
} else if (is_linux) {
host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
set_default_toolchain("//build/toolchain/linux:$cpu_arch")
-} else if (is_mac || is_ios) {
+} else if (is_mac) {
host_toolchain = "//build/toolchain/mac:clang"
set_default_toolchain(host_toolchain)
+} else if (is_ios) {
+ host_toolchain = "//build/toolchain/mac:host_clang"
+ set_default_toolchain("//build/toolchain/mac:clang")
}