aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2018-04-04 15:35:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-04 20:37:28 +0000
commit9bd736b9b4be1ea23baa3975bbe855cee74f43e8 (patch)
tree161fe9fd7f15112bcc1a02c121869214ed3874cd
parentc5509955b98daa0643da7fcd7ad356a9aa5a42da (diff)
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>
-rw-r--r--gn/BUILD.gn11
-rw-r--r--infra/bots/gen_tasks.go6
-rw-r--r--infra/bots/jobs.json4
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json72
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.py1
-rw-r--r--infra/bots/recipe_modules/flavor/gn_flavor.py31
-rw-r--r--infra/bots/tasks.json144
7 files changed, 265 insertions, 4 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index e7fffa2ab9..4c6eac27b0 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -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 += [
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index 76570ff15b..6706a46f01 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -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") {
diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json
index 5cf84d6fce..0cbc39c976 100644
--- a/infra/bots/jobs.json
+++ b/infra/bots/jobs.json
@@ -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",
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json
new file mode 100644
index 0000000000..92099f6c9b
--- /dev/null
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Build-Debian9-GCC-loongson3a-Release.json
@@ -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
+ }
+] \ No newline at end of file
diff --git a/infra/bots/recipe_modules/flavor/examples/full.py b/infra/bots/recipe_modules/flavor/examples/full.py
index 9030e2c43d..2bb86d912f 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.py
+++ b/infra/bots/recipe_modules/flavor/examples/full.py
@@ -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',
diff --git a/infra/bots/recipe_modules/flavor/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
index cc137ea8ad..f5efffa8b4 100644
--- a/infra/bots/recipe_modules/flavor/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -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:
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index a47532d7dd..d6e93c11a1 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -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",