Skip to content

Commit

Permalink
compat: Pass allowed prebuilds to configure()
Browse files Browse the repository at this point in the history
So the nested build uses the same preference.
  • Loading branch information
oleavr committed May 2, 2024
1 parent 74e6858 commit f273525
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion compat/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ def setup(role: Role,
target=AGENT_TARGET),
]

state = State(role, builddir, top_builddir, frida_version, host_os, host_arch, host_config, host_toolchain, outputs)
raw_allowed_prebuilds = os.environ.get("FRIDA_ALLOWED_PREBUILDS")
allowed_prebuilds = set(raw_allowed_prebuilds.split(",")) if raw_allowed_prebuilds is not None else None

state = State(role, builddir, top_builddir, frida_version, host_os, host_arch, host_config, host_toolchain,
allowed_prebuilds, outputs)
serialized_state = base64.b64encode(pickle.dumps(state)).decode('ascii')

variable_names, output_names = zip(*[(output.identifier, output.name) \
Expand All @@ -246,6 +250,7 @@ class State:
host_arch: str
host_config: str
host_toolchain: str
allowed_prebuilds: Optional[set[str]]
outputs: Mapping[str, Sequence[Output]]


Expand Down Expand Up @@ -314,6 +319,7 @@ def call_internal_meson(argv, *args, **kwargs):
builddir=workdir,
host_machine=host_machine,
environ=build_env,
allowed_prebuilds=state.allowed_prebuilds,
extra_meson_options=[
"-Dhelper_modern=",
"-Dhelper_legacy=",
Expand Down

0 comments on commit f273525

Please sign in to comment.