diff options
Diffstat (limited to 'infra/bots/recipe_modules')
3 files changed, 100 insertions, 4 deletions
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: |