[build] Fix RBE fallback on pkg, ddc and dyn bots.
Also fix --check-clean. `ninja target -t commands` reports the commands for the default target, fix to use `ninja -t commands target` instead. Change-Id: Ice179290e75b083a96abadb7540ca960eafcc982 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510440 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
a7c437e4d8
commit
b5eb9af663
+8
-4
@@ -198,8 +198,8 @@ def RunOneBuildCommand(build_config, args, env):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def CheckCleanBuild(build_config, args, rbe, env):
|
def CheckCleanBuild(build_config, args, rbe, targets, env):
|
||||||
explain_args = args + ['-n', '-d', 'explain']
|
explain_args = args[0:3] + ['-n', '-d', 'explain'] + targets
|
||||||
print(' '.join(explain_args))
|
print(' '.join(explain_args))
|
||||||
process = subprocess.Popen(explain_args,
|
process = subprocess.Popen(explain_args,
|
||||||
env=env,
|
env=env,
|
||||||
@@ -218,7 +218,7 @@ def CheckCleanBuild(build_config, args, rbe, env):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
if rbe:
|
if rbe:
|
||||||
list_args = args + ['-t', 'commands']
|
list_args = args[0:3] + ['-t', 'commands'] + targets
|
||||||
print(' '.join(list_args))
|
print(' '.join(list_args))
|
||||||
process = subprocess.Popen(list_args,
|
process = subprocess.Popen(list_args,
|
||||||
env=env,
|
env=env,
|
||||||
@@ -298,7 +298,11 @@ def Build(configs, env, options):
|
|||||||
|
|
||||||
if options.check_clean:
|
if options.check_clean:
|
||||||
for (build_config, args, rbe) in configs:
|
for (build_config, args, rbe) in configs:
|
||||||
if CheckCleanBuild(build_config, args, rbe, env=env) != 0:
|
if CheckCleanBuild(build_config,
|
||||||
|
args,
|
||||||
|
rbe,
|
||||||
|
options.build_targets,
|
||||||
|
env=env) != 0:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -11,11 +11,14 @@ template("wasm_module") {
|
|||||||
action(target_name) {
|
action(target_name) {
|
||||||
script = rebase_path("//build/gn_run_binary.py")
|
script = rebase_path("//build/gn_run_binary.py")
|
||||||
args = [
|
args = [
|
||||||
rebase_path("//third_party/emsdk/upstream/emscripten/emcc"),
|
rebase_path("//third_party/emsdk/upstream/emscripten/emcc",
|
||||||
|
root_build_dir),
|
||||||
"--no-entry",
|
"--no-entry",
|
||||||
rebase_path("//tests/web/wasm/ffi/${invoker.module_name}.c"),
|
rebase_path("//tests/web/wasm/ffi/${invoker.module_name}.c",
|
||||||
|
root_build_dir),
|
||||||
"-o",
|
"-o",
|
||||||
rebase_path("$root_out_dir/wasm/${invoker.module_name}.wasm"),
|
rebase_path("$root_out_dir/wasm/${invoker.module_name}.wasm",
|
||||||
|
root_build_dir),
|
||||||
"-O",
|
"-O",
|
||||||
]
|
]
|
||||||
inputs = [ "//tests/web/wasm/ffi/${invoker.module_name}.c" ]
|
inputs = [ "//tests/web/wasm/ffi/${invoker.module_name}.c" ]
|
||||||
|
|||||||
+13
-13
@@ -205,9 +205,8 @@ template("ddc_compile") {
|
|||||||
mnemonic = "DDC"
|
mnemonic = "DDC"
|
||||||
script = "../../pkg/dev_compiler/bin/dartdevc.dart"
|
script = "../../pkg/dev_compiler/bin/dartdevc.dart"
|
||||||
package_name = invoker.package
|
package_name = invoker.package
|
||||||
out_dir = rebase_path("$js_gen_dir")
|
sdk_path = rebase_path(sdk_outline_dill, root_build_dir)
|
||||||
sdk_path = rebase_path(sdk_outline_dill)
|
pkg_root = rebase_path("../../pkg", root_build_dir)
|
||||||
pkg_root = rebase_path("$root_build_dir/../../pkg")
|
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":ddc_files_stamp",
|
":ddc_files_stamp",
|
||||||
@@ -229,7 +228,8 @@ template("ddc_compile") {
|
|||||||
|
|
||||||
args += [
|
args += [
|
||||||
"--modules=$module",
|
"--modules=$module",
|
||||||
"-o$out_dir/$module/$package_name.js",
|
"-o" +
|
||||||
|
rebase_path("$js_gen_dir/$module/$package_name.js", root_build_dir),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ template("ddc_compile") {
|
|||||||
if (defined(invoker.package_dependencies)) {
|
if (defined(invoker.package_dependencies)) {
|
||||||
foreach(dep, invoker.package_dependencies) {
|
foreach(dep, invoker.package_dependencies) {
|
||||||
deps += [ ":${dep}_js" ]
|
deps += [ ":${dep}_js" ]
|
||||||
args += [ "-s$out_dir/$dep.dill" ]
|
args += [ "-s" + rebase_path("$out_dir/$dep.dill", root_build_dir) ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,10 +272,10 @@ template("package_kernel_outline") {
|
|||||||
|
|
||||||
module = invoker.package
|
module = invoker.package
|
||||||
output = "$target_gen_dir/${module}_outline.dill"
|
output = "$target_gen_dir/${module}_outline.dill"
|
||||||
sdk_outline = rebase_path(sdk_outline_dill)
|
sdk_outline = rebase_path(sdk_outline_dill, root_build_dir)
|
||||||
|
|
||||||
package_config =
|
package_config =
|
||||||
rebase_path("$root_out_dir/../../.dart_tool/package_config.json")
|
rebase_path("../../.dart_tool/package_config.json", root_build_dir)
|
||||||
|
|
||||||
prebuilt_dart_action(target_name) {
|
prebuilt_dart_action(target_name) {
|
||||||
deps = [
|
deps = [
|
||||||
@@ -286,16 +286,16 @@ template("package_kernel_outline") {
|
|||||||
outputs = [ output ]
|
outputs = [ output ]
|
||||||
args = [
|
args = [
|
||||||
"--packages-file",
|
"--packages-file",
|
||||||
"file:///$package_config",
|
package_config,
|
||||||
"--summary-only",
|
"--summary-only",
|
||||||
"--target",
|
"--target",
|
||||||
"ddc",
|
"ddc",
|
||||||
"--dart-sdk-summary",
|
"--dart-sdk-summary",
|
||||||
"file:///$sdk_outline",
|
sdk_outline,
|
||||||
"--source",
|
"--source",
|
||||||
"package:$module/$module.dart",
|
"package:$module/$module.dart",
|
||||||
"--output",
|
"--output",
|
||||||
rebase_path(output),
|
rebase_path(output, root_build_dir),
|
||||||
]
|
]
|
||||||
if (defined(invoker.extra_libraries)) {
|
if (defined(invoker.extra_libraries)) {
|
||||||
foreach(lib, invoker.extra_libraries) {
|
foreach(lib, invoker.extra_libraries) {
|
||||||
@@ -462,7 +462,7 @@ template("ddc_compile_sdk") {
|
|||||||
"--modules",
|
"--modules",
|
||||||
"$module",
|
"$module",
|
||||||
"-o",
|
"-o",
|
||||||
rebase_path("$js_gen_dir/$module/dart_sdk.js"),
|
rebase_path("$js_gen_dir/$module/dart_sdk.js", root_build_dir),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,8 +481,8 @@ template("ddc_compile_sdk") {
|
|||||||
# orignal source files while running SDK test suites.
|
# orignal source files while running SDK test suites.
|
||||||
# These JavaScript files and source maps are no longer packaged into the
|
# These JavaScript files and source maps are no longer packaged into the
|
||||||
# released SDK.
|
# released SDK.
|
||||||
rebase_path("$target_gen_dir/../../../dart-sdk"),
|
rebase_path("$target_gen_dir/../../../dart-sdk", root_build_dir),
|
||||||
rebase_path("$sdk_full_dill"),
|
rebase_path("$sdk_full_dill", root_build_dir),
|
||||||
]
|
]
|
||||||
|
|
||||||
if (invoker.canary) {
|
if (invoker.canary) {
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ aot_snapshot("dynamic_module_runner_snapshot") {
|
|||||||
name = "dynamic_module_runner"
|
name = "dynamic_module_runner"
|
||||||
gen_kernel_args =
|
gen_kernel_args =
|
||||||
[ "--dynamic-interface=" + rebase_path(
|
[ "--dynamic-interface=" + rebase_path(
|
||||||
"$_dart_root/utils/dynamic_module_runner/dynamic_interface.yaml") ]
|
"$_dart_root/utils/dynamic_module_runner/dynamic_interface.yaml",
|
||||||
|
root_build_dir) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
aot_snapshot("dynamic_modules_test_suite_snapshot") {
|
aot_snapshot("dynamic_modules_test_suite_snapshot") {
|
||||||
|
|||||||
Reference in New Issue
Block a user