[build] Fix more invocations to use relative paths.

Change-Id: I417ff793567a8adbbc4cc4fd4f77792c9a451f89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506280
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
Ryan Macnak
2026-05-26 10:19:40 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent c4d1c3a3e8
commit d907fbb72b
11 changed files with 34 additions and 35 deletions
+4 -4
View File
@@ -36,13 +36,13 @@ template("copy_tree") {
common_args = [
"--from",
rebase_path(source),
rebase_path(source, root_build_dir),
"--to",
rebase_path(dest),
rebase_path(dest, root_build_dir),
"--depfile",
rebase_path(depfile),
rebase_path(depfile, root_build_dir),
"--stamp",
rebase_path(stampfile),
rebase_path(stampfile, root_build_dir),
]
if (defined(invoker.exclude)) {
common_args += [
@@ -165,7 +165,8 @@ template("fuchsia_toolchain") {
rspfile = "$outfile.rsp"
symfile = "$outfile.sym"
symbolizer_script =
rebase_path("//runtime/tools/dart_profiler_symbols.py")
rebase_path("//runtime/tools/dart_profiler_symbols.py",
root_build_dir)
# Note that the unstripped_outfile is in the exe.stripped folder.
# We should probably clean this up, but changing this and dart.cmx
+2 -1
View File
@@ -202,7 +202,8 @@ template("gcc_toolchain") {
command = "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix"
symbolizer_script =
rebase_path("//runtime/tools/dart_profiler_symbols.py")
rebase_path("//runtime/tools/dart_profiler_symbols.py",
root_build_dir)
symbolize_command =
"$symbolizer_script --nm $nm --output $symfile --binary $outfile"
command += " && $symbolize_command"
+2 -1
View File
@@ -203,7 +203,8 @@ template("mac_toolchain") {
commands += [ "$dsymutil -o $dsymdir $outfile" ]
symbolizer_script =
rebase_path("//runtime/tools/dart_profiler_symbols.py")
rebase_path("//runtime/tools/dart_profiler_symbols.py",
root_build_dir)
commands +=
[ "$symbolizer_script --nm $nm --output $symfile --binary $outfile" ]
+4 -4
View File
@@ -318,7 +318,7 @@ action("build_devtools") {
script = "../tools/build_devtools.py"
args = [
"--output",
rebase_path(output),
rebase_path(output, root_build_dir),
]
}
@@ -820,7 +820,7 @@ action("write_version_file") {
script = "../tools/write_version_file.py"
args = [
"--output",
rebase_path(output),
rebase_path(output, root_build_dir),
]
if (!dart_version_git_info) {
args += [ "--no-git-hash" ]
@@ -836,7 +836,7 @@ action("write_revision_file") {
script = "../tools/write_revision_file.py"
args = [
"--output",
rebase_path(output),
rebase_path(output, root_build_dir),
]
if (!dart_version_git_info) {
args += [ "--no-git-hash" ]
@@ -866,7 +866,7 @@ action("write_dartdoc_options") {
script = "../tools/write_dartdoc_options_file.py"
args = [
"--output",
rebase_path(output),
rebase_path(output, root_build_dir),
]
if (!dart_version_git_info) {
args += [ "--no-git-hash" ]
+2 -2
View File
@@ -30,7 +30,7 @@ aot_snapshot("analysis_server_aot_product") {
application_snapshot("analysis_server") {
main_dart = "../../pkg/analysis_server/bin/server.dart"
training_args = [
"--sdk=" + rebase_path("../../sdk/"),
"--train-using=" + rebase_path("../../pkg/compiler/lib"),
"--sdk=" + rebase_path("../../sdk/", root_build_dir),
"--train-using=" + rebase_path("../../pkg/compiler/lib", root_build_dir),
]
}
+6 -6
View File
@@ -121,27 +121,27 @@ template("aot_snapshot") {
outputs = [ unsigned_snapshot ]
abs_output = rebase_path(unsigned_snapshot)
rebased_output = rebase_path(unsigned_snapshot, root_build_dir)
# TODO(60813): Generate PE DLL on Windows.
if (is_mac) {
vm_args = [
"--deterministic",
"--snapshot-kind=app-aot-macho-dylib",
"--macho=$abs_output",
"--macho=$rebased_output",
] + gen_snapshot_args
} else {
vm_args = [
"--deterministic",
"--snapshot-kind=app-aot-elf",
"--elf=$abs_output",
"--elf=$rebased_output",
] + gen_snapshot_args
}
if (defined(invoker.vm_args)) {
vm_args += invoker.vm_args
}
args = [ rebase_path(dill) ]
args = [ rebase_path(dill, root_build_dir) ]
force_product_mode = product_mode
}
@@ -158,9 +158,9 @@ template("aot_snapshot") {
"--identity",
codesigning_identity,
"--input",
rebase_path(unsigned_snapshot),
rebase_path(unsigned_snapshot, root_build_dir),
"--output",
rebase_path(signed_snapshot),
rebase_path(signed_snapshot, root_build_dir),
]
}
} else {
+1 -1
View File
@@ -44,7 +44,7 @@ prebuilt_dart_action("dart2js_create_snapshot_entry") {
packages = "../../.dart_tool/package_config.json"
args = [ "--output_dir=$output_dir" ]
args = [ "--output_dir=" + rebase_path(output_dir, root_build_dir) ]
if (!dart_version_git_info) {
args += [ "--no-git-hash" ]
}
+2 -2
View File
@@ -12,8 +12,8 @@ template("create_timestamp_file") {
action(target_name) {
script = "$_dart_root/tools/list_dart_files_as_depfile.py"
args = [
rebase_path(output),
path,
rebase_path(output, root_build_dir),
rebase_path(path, root_build_dir),
]
if (defined(invoker.pattern)) {
args += [ invoker.pattern ]
+8 -8
View File
@@ -41,12 +41,12 @@ application_snapshot("dartdevc") {
training_args = [
"--packages",
rebase_path("../../.dart_tool/package_config.json"),
rebase_path("../../.dart_tool/package_config.json", root_build_dir),
"--dart-sdk-summary",
rebase_path(sdk_outline_dill),
rebase_path(sdk_outline_dill, root_build_dir),
"-o",
"dartdevc.js",
rebase_path("../../pkg/dev_compiler/bin/dartdevc.dart"),
rebase_path("../../pkg/dev_compiler/bin/dartdevc.dart", root_build_dir),
]
training_deps = [ ":ddc_platform" ]
@@ -58,8 +58,8 @@ template("dart2js_compile") {
main = invoker.main
assert(defined(invoker.out), "Must specify the out file")
out = invoker.out
abs_main = rebase_path(main)
abs_output = rebase_path(out)
rebased_main = rebase_path(main, root_build_dir)
rebased_output = rebase_path(out, root_build_dir)
prebuilt_dart_action(target_name) {
deps = invoker.deps + [ "../compiler:compile_dart2js_platform" ]
@@ -77,12 +77,12 @@ template("dart2js_compile") {
vm_args = [ "-Dsdk_hash=$sdk_hash" ]
args = [
"$abs_main",
"$rebased_main",
"-m",
"--invoker=gn_build",
"-o$abs_output",
"-o$rebased_output",
"--no-source-maps",
"--platform-binaries=" + rebase_path("$root_out_dir"),
"--platform-binaries=" + rebase_path("$root_out_dir", root_build_dir),
]
}
}
+1 -5
View File
@@ -29,11 +29,7 @@ application_snapshot("kernel-service_snapshot") {
main_dart = "../../$_kernel_service_script"
training_args = [
"--train",
# Force triple-slashes both on Windows and otherwise.
# Becomes e.g. file:///full/path/to/file and "file:///C:/full/path/to/file.
# Without the ', "/"' part, on Linux it would get four slashes.
"file:///" + rebase_path("../../$_kernel_service_script", "/"),
rebase_path("../../$_kernel_service_script", root_build_dir),
]
output = "$root_gen_dir/kernel-service.dart.snapshot"
}