Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 9939f78

Browse files
committed
Bug 1612515 - Part 4: Move RunCBindgen.py to /build. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D64541 --HG-- rename : layout/style/RunCbindgen.py => build/RunCbindgen.py extra : moz-landing-system : lando
1 parent fd4c6c6 commit 9939f78

10 files changed

Lines changed: 16 additions & 13 deletions

File tree

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
import subprocess
1010
import pytoml
1111

12+
1213
# Try to read the package name or otherwise assume same name as the crate path.
1314
def _get_crate_name(crate_path):
1415
try:
1516
with open(mozpath.join(crate_path, "Cargo.toml")) as f:
16-
return pytoml.load(f)["package"]["name"]
17-
except:
17+
return pytoml.load(f)["package"]["name"]
18+
except Exception:
1819
return mozpath.basename(crate_path)
1920

21+
2022
CARGO_LOCK = mozpath.join(buildconfig.topsrcdir, "Cargo.lock")
2123

24+
2225
def _generate(output, cbindgen_crate_path, metadata_crate_path,
2326
in_tree_dependencies):
2427
env = os.environ.copy()

dom/media/moz.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,13 @@ if CONFIG['COMPILE_ENVIRONMENT']:
378378
]
379379

380380
GeneratedFile('audioipc_client_ffi_generated.h',
381-
script='/layout/style/RunCbindgen.py', entry_point='generate',
381+
script='/build/RunCbindgen.py', entry_point='generate',
382382
inputs=[
383383
'/media/audioipc/client',
384384
])
385385

386386
GeneratedFile('audioipc_server_ffi_generated.h',
387-
script='/layout/style/RunCbindgen.py', entry_point='generate',
387+
script='/build/RunCbindgen.py', entry_point='generate',
388388
inputs=[
389389
'/media/audioipc/server',
390390
])

dom/webgpu/ffi/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ UNIFIED_SOURCES += [
1313

1414
if CONFIG['COMPILE_ENVIRONMENT']:
1515
GeneratedFile('wgpu_ffi_generated.h',
16-
script='/layout/style/RunCbindgen.py',
16+
script='/build/RunCbindgen.py',
1717
entry_point='generate',
1818
inputs=[
1919
'/gfx/wgpu/wgpu-remote',

gfx/webrender_bindings/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
9292
]
9393

9494
GeneratedFile('webrender_ffi_generated.h',
95-
script='/layout/style/RunCbindgen.py', entry_point='generate',
95+
script='/build/RunCbindgen.py', entry_point='generate',
9696
inputs=[
9797
'/gfx/webrender_bindings',
9898
'/gfx/wr/webrender',

intl/hyphenation/glue/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
2727
]
2828

2929
generated = GENERATED_FILES['mapped_hyph.h']
30-
generated.script = '/layout/style/RunCbindgen.py:generate'
30+
generated.script = '/build/RunCbindgen.py:generate'
3131
generated.inputs = [
3232
'/third_party/rust/mapped_hyph'
3333
]

intl/locale/moz.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ if CONFIG['COMPILE_ENVIRONMENT']:
9494
]
9595

9696
ffi_generated = GENERATED_FILES['unic_langid_ffi_generated.h']
97-
ffi_generated.script = '/layout/style/RunCbindgen.py:generate'
97+
ffi_generated.script = '/build/RunCbindgen.py:generate'
9898
ffi_generated.inputs = [
9999
'/intl/locale/rust/unic-langid-ffi',
100100
]
101101

102102
ffi_generated = GENERATED_FILES['fluent_langneg_ffi_generated.h']
103-
ffi_generated.script = '/layout/style/RunCbindgen.py:generate'
103+
ffi_generated.script = '/build/RunCbindgen.py:generate'
104104
ffi_generated.inputs = [
105105
'/intl/locale/rust/fluent-langneg-ffi',
106106
]

layout/style/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
298298
py2=True,
299299
entry_point='generate',
300300
inputs=['!ServoCSSPropList.py'])
301-
GeneratedFile('ServoStyleConsts.h', script='RunCbindgen.py',
301+
GeneratedFile('ServoStyleConsts.h', script='/build/RunCbindgen.py',
302302
entry_point='generate',
303303
inputs = ['/servo/ports/geckolib', '/servo/components/style'])
304304

media/mp4parse-rust/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
1919
]
2020

2121
ffi_generated = GENERATED_FILES['mp4parse_ffi_generated.h']
22-
ffi_generated.script = '/layout/style/RunCbindgen.py:generate'
22+
ffi_generated.script = '/build/RunCbindgen.py:generate'
2323
ffi_generated.inputs = [
2424
'/media/mp4parse-rust/mp4parse_capi',
2525
]

netwerk/socket/neqo_glue/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LOCAL_INCLUDES += [
1515

1616
if CONFIG['COMPILE_ENVIRONMENT']:
1717
GeneratedFile('neqo_glue_ffi_generated.h',
18-
script='/layout/style/RunCbindgen.py',
18+
script='/build/RunCbindgen.py',
1919
entry_point='generate',
2020
inputs=['/netwerk/socket/neqo_glue'])
2121

xpcom/base/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
225225
]
226226

227227
GeneratedFile('gk_rust_utils_ffi_generated.h',
228-
script='/layout/style/RunCbindgen.py',
228+
script='/build/RunCbindgen.py',
229229
entry_point='generate', inputs=['/xpcom/rust/gkrust_utils'])
230230

231231
include('/ipc/chromium/chromium-config.mozbuild')

0 commit comments

Comments
 (0)