Skip to content

Instantly share code, notes, and snippets.

@barrbrain
Created February 26, 2026 04:51
Show Gist options
  • Select an option

  • Save barrbrain/39e4cc4e6399081feb2a879266237e70 to your computer and use it in GitHub Desktop.

Select an option

Save barrbrain/39e4cc4e6399081feb2a879266237e70 to your computer and use it in GitHub Desktop.
Siso + NativeLink
diff --git a/build/android/gyp/aidl.py b/build/android/gyp/aidl.py
index e03694db83..ca0febf46e 100755
--- a/build/android/gyp/aidl.py
+++ b/build/android/gyp/aidl.py
@@ -32,8 +32,22 @@ def do_native(options, files):
aidl_cmd += [f]
build_utils.CheckOutput(aidl_cmd)
+ found_outputs = build_utils.FindInDirectory(options.header_output_dir, '*.h')
+ for path in found_outputs:
+ with open(path, encoding='utf-8') as fileobj:
+ data = fileobj.read()
+ data = data.replace(temp_dir, 'TEMP_DIR')
+ with open(path, "w", encoding='utf-8') as fileobj:
+ fileobj.write(data)
+
found_outputs = build_utils.FindInDirectory(temp_dir, '*.cpp')
assert len(found_outputs) == 1, '\n'.join(found_outputs)
+ path = found_outputs[0]
+ with open(path, encoding='utf-8') as fileobj:
+ data = fileobj.read()
+ data = data.replace(temp_dir, 'TEMP_DIR')
+ with open(path, "w", encoding='utf-8') as fileobj:
+ fileobj.write(data)
shutil.move(found_outputs[0], options.cpp_output[i])
@@ -85,6 +99,7 @@ def main(argv):
pkg_name = re.search(r'^\s*package\s+(.*?)\s*;', data, re.M).group(1)
arcname = '%s/%s' % (
pkg_name.replace('.', '/'), os.path.basename(path))
+ data = data.replace(temp_dir, 'TEMP_DIR')
zip_helpers.add_to_zip_hermetic(srcjar, arcname, data=data)
if options.header_output_dir:
diff --git a/build/config/siso/backend_config/google.star b/build/config/siso/backend_config/google.star
index acbea5f249..3c7f71bb71 100644
--- a/build/config/siso/backend_config/google.star
+++ b/build/config/siso/backend_config/google.star
@@ -11,19 +11,21 @@ def __platform_properties(ctx):
return {
"default": {
"OSFamily": "Linux",
+ "ISA": "x86-64",
"container-image": container_image,
- "label:action_default": "1",
+ # "label:action_default": "1",
},
# Large workers are usually used for Python actions like generate bindings, mojo generators etc
# They can run on Linux workers.
"large": {
"OSFamily": "Linux",
+ "ISA": "x86-64",
"container-image": container_image,
# As of Jul 2023, the action_large pool uses n2-highmem-8 with 200GB of pd-ssd.
# The pool is intended for the following actions.
# - slow actions that can benefit from multi-cores and/or faster disk I/O. e.g. link, mojo, generate bindings etc.
# - actions that fail for OOM.
- "label:action_large": "1",
+ # "label:action_large": "1",
},
}
diff --git a/build/config/siso/rust.star b/build/config/siso/rust.star
index dddee17b92..189428a1dc 100644
--- a/build/config/siso/rust.star
+++ b/build/config/siso/rust.star
@@ -165,7 +165,7 @@ __handlers = {
def __step_config(ctx, step_config):
platform_ref = "large" # Rust actions run faster on large workers.
- remote = config.get(ctx, "googlechrome")
+ remote = False # config.get(ctx, "googlechrome")
# TODO(crbug.com/434857701): fix link for target_arch="x86"
remote_link = False
diff --git a/third_party/blink/renderer/build/scripts/run_with_pythonpath.py b/third_party/blink/renderer/build/scripts/run_with_pythonpath.py
index 1b535b1bd1..1242a1afd8 100755
--- a/third_party/blink/renderer/build/scripts/run_with_pythonpath.py
+++ b/third_party/blink/renderer/build/scripts/run_with_pythonpath.py
@@ -22,7 +22,7 @@ def main():
existing_pp = (
os.pathsep + env['PYTHONPATH']) if 'PYTHONPATH' in env else ''
env['PYTHONPATH'] = os.pathsep.join(python_paths) + existing_pp
- sys.exit(subprocess.call([sys.executable] + args, env=env))
+ sys.exit(subprocess.call([sys.executable or '/usr/bin/python3'] + args, env=env))
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment