Add loongson3a Build jobs.

Change-Id: I4a0259f82272099e08df0e7dea91489f6d641ca4
Reviewed-on: https://skia-review.googlesource.com/113670
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
Ben Wagner 2018-04-04 15:35:01 -04:00 committed by Skia Commit-Bot
parent c5509955b9
commit 9bd736b9b4
7 changed files with 265 additions and 4 deletions

View File

@ -112,6 +112,17 @@ config("default") {
"-mfpu=neon",
"-mthumb",
]
} else if (current_cpu == "loongson3a") {
asmflags += [ "-march=loongson3a" ]
cflags += [
"-march=loongson3a",
# Causes an internal compiler error.
"-DSKCMS_PORTABLE",
]
} else if (current_cpu == "mips64el") {
asmflags += [ "-march=mips64" ]
cflags += [ "-march=mips64" ]
} else if (current_cpu == "x86" && !is_win) {
asmflags += [ "-m32" ]
cflags += [

View File

@ -546,6 +546,12 @@ func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) str
if strings.Contains(name, "EMCC") {
pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("emscripten_sdk"))
}
if parts["target_arch"] == "mips64el" || parts["target_arch"] == "loongson3a" {
if parts["compiler"] != "GCC" {
glog.Fatalf("mips64el toolchain is GCC, but compiler is %q in %q", parts["compiler"], name)
}
pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("mips64el_toolchain_linux"))
}
} else if strings.Contains(name, "Win") {
deps = append(deps, isolateCIPDAsset(b, ISOLATE_WIN_TOOLCHAIN_NAME))
if strings.Contains(name, "Clang") {

View File

@ -48,6 +48,10 @@
"Build-Debian9-EMCC-wasm-Release",
"Build-Debian9-GCC-arm-Debug-Chromecast",
"Build-Debian9-GCC-arm-Release-Chromecast",
"Build-Debian9-GCC-loongson3a-Debug",
"Build-Debian9-GCC-loongson3a-Release",
"Build-Debian9-GCC-mips64el-Debug",
"Build-Debian9-GCC-mips64el-Release",
"Build-Debian9-GCC-x86-Debug",
"Build-Debian9-GCC-x86-Release",
"Build-Debian9-GCC-x86_64-Debug",

View File

@ -0,0 +1,72 @@
[
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"[CUSTOM_/_B_WORK]/skia/infra/bots/assets/mips64el_toolchain_linux/VERSION",
"/path/to/tmp/"
],
"infra_step": true,
"name": "Get mips64el_toolchain_linux VERSION"
},
{
"cmd": [
"python",
"-u",
"[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release"
},
"infra_step": true,
"name": "fetch-gn"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/skia/bin/gn",
"gen",
"[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release/Release",
"--args=cc=\"[START_DIR]/mips64el_toolchain_linux/bin/mips64el-linux-gnuabi64-gcc-7\" cxx=\"[START_DIR]/mips64el_toolchain_linux/bin/mips64el-linux-gnuabi64-g++-7\" extra_cflags=[\"-Wno-format-truncation\", \"-Wno-uninitialized\", \"-DDUMMY_mips64el_toolchain_linux_version=42\", \"-Wno-strict-overflow\"] extra_ldflags=[\"-L[START_DIR]/mips64el_toolchain_linux/mips64el-linux-gnuabi64/lib\"] is_debug=false skia_enable_gpu=false skia_use_fontconfig=false skia_use_system_freetype2=false target_cpu=\"loongson3a\""
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"LD_LIBRARY_PATH": "[START_DIR]/mips64el_toolchain_linux/lib/x86_64-linux-gnu/",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release"
},
"name": "gn gen"
},
{
"cmd": [
"ninja",
"-k",
"0",
"-C",
"[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release/Release"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"LD_LIBRARY_PATH": "[START_DIR]/mips64el_toolchain_linux/lib/x86_64-linux-gnu/",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[CUSTOM_/_B_WORK]/skia/out/Build-Debian9-GCC-loongson3a-Release"
},
"name": "ninja"
},
{
"name": "$result",
"recipe_result": null,
"status_code": 0
}
]

View File

@ -70,6 +70,7 @@ TEST_BUILDERS = [
'Build-Debian9-Clang-x86_64-Release-NoDEPS',
'Build-Debian9-Clang-x86_64-Release-Vulkan',
'Build-Debian9-EMCC-wasm-Release',
'Build-Debian9-GCC-loongson3a-Release',
'Build-Debian9-GCC-x86_64-Debug-EmbededResouces',
'Build-Debian9-GCC-x86_64-Release-ANGLE',
'Build-Debian9-GCC-x86_64-Release-Flutter_Android',

View File

@ -41,6 +41,8 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
cc, cxx = None, None
extra_cflags = []
extra_ldflags = []
args = {}
env = {}
if compiler == 'Clang' and self.m.vars.is_linux:
cc = clang_linux + '/bin/clang'
@ -56,7 +58,31 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
elif compiler == 'Clang':
cc, cxx = 'clang', 'clang++'
elif compiler == 'GCC':
cc, cxx = 'gcc', 'g++'
if target_arch in ['mips64el', 'loongson3a']:
mips64el_toolchain_linux = str(self.m.vars.slave_dir.join(
'mips64el_toolchain_linux'))
cc = mips64el_toolchain_linux + '/bin/mips64el-linux-gnuabi64-gcc-7'
cxx = mips64el_toolchain_linux + '/bin/mips64el-linux-gnuabi64-g++-7'
env['LD_LIBRARY_PATH'] = (
mips64el_toolchain_linux + '/lib/x86_64-linux-gnu/')
extra_ldflags.append('-L' + mips64el_toolchain_linux +
'/mips64el-linux-gnuabi64/lib')
extra_cflags.extend([
'-Wno-format-truncation',
'-Wno-uninitialized',
('-DDUMMY_mips64el_toolchain_linux_version=%s' %
self.m.run.asset_version('mips64el_toolchain_linux'))
])
if configuration == 'Release':
# This warning is only triggered when fuzz_canvas is inlined.
extra_cflags.append('-Wno-strict-overflow')
args.update({
'skia_use_system_freetype2': 'false',
'skia_use_fontconfig': 'false',
'skia_enable_gpu': 'false',
})
else:
cc, cxx = 'gcc', 'g++'
elif compiler == 'EMCC':
cc = emscripten_sdk + '/emscripten/incoming/emcc'
cxx = emscripten_sdk + '/emscripten/incoming/em++'
@ -91,9 +117,6 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
if 'MSAN' in extra_tokens:
extra_ldflags.append('-L' + clang_linux + '/msan')
args = {}
env = {}
if configuration != 'Debug':
args['is_debug'] = 'false'
if 'ANGLE' in extra_tokens:

View File

@ -294,6 +294,30 @@
"Build-Debian9-GCC-arm-Release-Chromecast"
]
},
"Build-Debian9-GCC-loongson3a-Debug": {
"priority": 0.8,
"tasks": [
"Build-Debian9-GCC-loongson3a-Debug"
]
},
"Build-Debian9-GCC-loongson3a-Release": {
"priority": 0.8,
"tasks": [
"Build-Debian9-GCC-loongson3a-Release"
]
},
"Build-Debian9-GCC-mips64el-Debug": {
"priority": 0.8,
"tasks": [
"Build-Debian9-GCC-mips64el-Debug"
]
},
"Build-Debian9-GCC-mips64el-Release": {
"priority": 0.8,
"tasks": [
"Build-Debian9-GCC-mips64el-Release"
]
},
"Build-Debian9-GCC-x86-Debug": {
"priority": 0.8,
"tasks": [
@ -4772,6 +4796,126 @@
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Debian9-GCC-loongson3a-Debug": {
"cipd_packages": [
{
"name": "skia/bots/mips64el_toolchain_linux",
"path": "mips64el_toolchain_linux",
"version": "version:4"
}
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"os:Debian-9.2",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"compile",
"repository=<(REPO)",
"buildername=Build-Debian9-GCC-loongson3a-Debug",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Debian9-GCC-loongson3a-Release": {
"cipd_packages": [
{
"name": "skia/bots/mips64el_toolchain_linux",
"path": "mips64el_toolchain_linux",
"version": "version:4"
}
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"os:Debian-9.2",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"compile",
"repository=<(REPO)",
"buildername=Build-Debian9-GCC-loongson3a-Release",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Debian9-GCC-mips64el-Debug": {
"cipd_packages": [
{
"name": "skia/bots/mips64el_toolchain_linux",
"path": "mips64el_toolchain_linux",
"version": "version:4"
}
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"os:Debian-9.2",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"compile",
"repository=<(REPO)",
"buildername=Build-Debian9-GCC-mips64el-Debug",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Debian9-GCC-mips64el-Release": {
"cipd_packages": [
{
"name": "skia/bots/mips64el_toolchain_linux",
"path": "mips64el_toolchain_linux",
"version": "version:4"
}
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"os:Debian-9.2",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"compile",
"repository=<(REPO)",
"buildername=Build-Debian9-GCC-mips64el-Release",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Build-Debian9-GCC-x86-Debug": {
"dimensions": [
"cpu:x86-64-Haswell_GCE",