GN: support 32-bit x86 builds
Take over Ubuntu -x86- bots. Note the change to Build-Win-MSVC-x86-Release-GN.json, which is not incidental. We'll want target_cpu="x86" there too. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340463008 Committed: https://skia.googlesource.com/skia/+/1949386ae00485ae92dd5608a2614b9dee417542 CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-Clang-x86-Debug-GN_Android-Trybot,Build-Ubuntu-GCC-x86-Release-Trybot Review-Url: https://codereview.chromium.org/2340463008
This commit is contained in:
parent
ab00f4222c
commit
1fbdf98d0e
34
BUILD.gn
34
BUILD.gn
@ -554,22 +554,26 @@ action("skia.h") {
|
||||
]
|
||||
}
|
||||
|
||||
executable("fiddle") {
|
||||
include_dirs = [ "$target_gen_dir" ]
|
||||
libs = []
|
||||
if (is_linux) {
|
||||
libs += [ "OSMesa" ]
|
||||
}
|
||||
if (target_cpu == "x64") {
|
||||
# Our bots only have 64-bit libOSMesa installed.
|
||||
# TODO: worth fixing?
|
||||
executable("fiddle") {
|
||||
include_dirs = [ "$target_gen_dir" ]
|
||||
libs = []
|
||||
if (is_linux) {
|
||||
libs += [ "OSMesa" ]
|
||||
}
|
||||
|
||||
sources = [
|
||||
"src/images/SkForceLinking.cpp",
|
||||
"tools/fiddle/draw.cpp",
|
||||
"tools/fiddle/fiddle_main.cpp",
|
||||
]
|
||||
deps = [
|
||||
":skia",
|
||||
":skia.h",
|
||||
]
|
||||
sources = [
|
||||
"src/images/SkForceLinking.cpp",
|
||||
"tools/fiddle/draw.cpp",
|
||||
"tools/fiddle/fiddle_main.cpp",
|
||||
]
|
||||
deps = [
|
||||
":skia",
|
||||
":skia.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# Targets guarded by skia_enable_tools may use //third_party freely.
|
||||
|
11
gn/BUILD.gn
11
gn/BUILD.gn
@ -39,6 +39,7 @@ config("debug_symbols") {
|
||||
}
|
||||
|
||||
config("default") {
|
||||
asmflags = []
|
||||
cflags = [
|
||||
"-O1",
|
||||
"-fstrict-aliasing",
|
||||
@ -77,10 +78,18 @@ config("default") {
|
||||
"-march=mips32r2",
|
||||
"-mdspr2",
|
||||
]
|
||||
} else if (current_cpu == "x86") {
|
||||
asmflags += [ "-m32" ]
|
||||
cflags += [
|
||||
"-m32",
|
||||
"-msse2",
|
||||
"-mfpmath=sse",
|
||||
]
|
||||
ldflags += [ "-m32" ]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
asmflags = [
|
||||
asmflags += [
|
||||
"--target=$ndk_target",
|
||||
"-B$ndk/toolchains/$ndk_gccdir-4.9/prebuilt/$ndk_host/$ndk_target/bin",
|
||||
]
|
||||
|
@ -8,12 +8,15 @@ import default_flavor
|
||||
class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
def supported(self):
|
||||
extra_config = self.m.vars.builder_cfg.get('extra_config', '')
|
||||
os = self.m.vars.builder_cfg.get('os', '')
|
||||
target_arch = self.m.vars.builder_cfg.get('target_arch', '')
|
||||
|
||||
return any([
|
||||
'SAN' in extra_config,
|
||||
extra_config == 'Fast',
|
||||
extra_config == 'GN',
|
||||
extra_config.startswith('SK')
|
||||
extra_config.startswith('SK'),
|
||||
os == 'Ubuntu' and target_arch == 'x86',
|
||||
])
|
||||
|
||||
def _run(self, title, cmd, env=None, infra_step=False):
|
||||
@ -29,6 +32,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
configuration = self.m.vars.builder_cfg.get('configuration', '')
|
||||
extra_config = self.m.vars.builder_cfg.get('extra_config', '')
|
||||
os = self.m.vars.builder_cfg.get('os', '')
|
||||
target_arch = self.m.vars.builder_cfg.get('target_arch', '')
|
||||
|
||||
clang_linux = str(self.m.vars.slave_dir.join('clang_linux'))
|
||||
|
||||
@ -65,6 +69,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
|
||||
'extra_cflags': ' '.join(extra_cflags),
|
||||
'extra_ldflags': ' '.join(extra_ldflags),
|
||||
'sanitize': extra_config if 'SAN' in extra_config else '',
|
||||
'target_cpu': 'x86' if target_arch == 'x86' else '',
|
||||
}.iteritems():
|
||||
if v:
|
||||
args[k] = '"%s"' % v
|
||||
|
@ -121,19 +121,38 @@
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"make",
|
||||
"most"
|
||||
"[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
"BUILDTYPE": "Debug",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"CHROME_PATH": "[SLAVE_BUILD]/src",
|
||||
"GYP_DEFINES": "skia_arch_type=x86 skia_warnings_as_errors=1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug"
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "build most"
|
||||
"name": "fetch-gn"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug/Debug",
|
||||
"--args=cc=\"gcc\" cxx=\"g++\" target_cpu=\"x86\""
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "gn gen"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
"ninja",
|
||||
"-C",
|
||||
"[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug/Debug"
|
||||
],
|
||||
"cwd": "[CUSTOM_/_B_WORK]/skia",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]"
|
||||
},
|
||||
"name": "ninja"
|
||||
},
|
||||
{
|
||||
"cmd": [
|
||||
|
@ -134,7 +134,7 @@
|
||||
"gn",
|
||||
"gen",
|
||||
"[CUSTOM_C:\\_B_WORK]\\skia\\out\\Build-Win-MSVC-x86-Release-GN\\Release",
|
||||
"--args=is_debug=false"
|
||||
"--args=is_debug=false target_cpu=\"x86\""
|
||||
],
|
||||
"cwd": "[CUSTOM_C:\\_B_WORK]\\skia",
|
||||
"env": {
|
||||
|
@ -35,7 +35,7 @@
|
||||
"BUILDTYPE": "Debug",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug"
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug"
|
||||
},
|
||||
"name": "gclient setup"
|
||||
},
|
||||
@ -64,7 +64,7 @@
|
||||
"BUILDTYPE": "Debug",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug"
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug"
|
||||
},
|
||||
"name": "gclient sync",
|
||||
"~followup_annotations": [
|
||||
@ -95,7 +95,7 @@
|
||||
"BUILDTYPE": "Debug",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug"
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug"
|
||||
},
|
||||
"name": "gclient recurse (git config user.name)"
|
||||
},
|
||||
@ -115,7 +115,7 @@
|
||||
"BUILDTYPE": "Debug",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug"
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug"
|
||||
},
|
||||
"name": "gclient recurse (git config user.email)"
|
||||
},
|
||||
@ -129,9 +129,9 @@
|
||||
"BUILDTYPE": "Debug",
|
||||
"CHROME_HEADLESS": "1",
|
||||
"CHROME_PATH": "[SLAVE_BUILD]/src",
|
||||
"GYP_DEFINES": "skia_arch_type=x86 skia_warnings_as_errors=1",
|
||||
"GYP_DEFINES": "skia_arch_type=x86_64 skia_warnings_as_errors=1",
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]:RECIPE_PACKAGE_REPO[depot_tools]",
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86-Debug"
|
||||
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Ubuntu-GCC-x86_64-Debug"
|
||||
},
|
||||
"name": "build most",
|
||||
"~followup_annotations": [
|
||||
|
@ -265,7 +265,7 @@ def GenTests(api):
|
||||
|
||||
mastername = 'client.skia.compile'
|
||||
slavename = 'skiabot-win-compile-000'
|
||||
buildername = 'Build-Ubuntu-GCC-x86-Debug'
|
||||
buildername = 'Build-Ubuntu-GCC-x86_64-Debug'
|
||||
yield (
|
||||
api.test('failed_compile') +
|
||||
api.properties(buildername=buildername,
|
||||
|
Loading…
Reference in New Issue
Block a user