Skip to content

Commit 485468f

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
OSS CI: emit PIC + THRIFT_SERIALIZATION_ONLY cmake defines
Summary: The hand-maintained workflow yml in the rebalancer OSS GitHub repo passes `CMAKE_POSITION_INDEPENDENT_CODE: ON` to every dep build (boost, clang19, fmt, folly, fbthrift, …) and `THRIFT_SERIALIZATION_ONLY: ON` to fbthrift. The fbsource-side regenerated yml drops these on every regen, requiring repeated hand-fixes to keep CI green. This change makes the regen produce the same defines: - `update-all-github-actions.sh`: pass `--extra-cmake-defines '{"CMAKE_POSITION_INDEPENDENT_CODE":"ON"}'` and `--package-extra-cmake-defines fbthrift='{"THRIFT_SERIALIZATION_ONLY":"ON"}'` to the rebalancer linux + darwin generate-github-actions invocations. - `getdeps.py` (`generate-github-actions`): seed the per-step `extra_cmake_defines` dict from `args.extra_cmake_defines` so the existing flag actually propagates to dep build steps. Previously the flag was registered but ignored at the generator level — the dict was always re-initialized to empty before being merged with sccache + per-package overrides. This matches the flag's documented semantics ('current project and all its deps'). Only the rebalancer GEN lines pass the new flag, so other projects' workflows are unaffected. The README.facebook.md tweak drops the literal '`generated`' rendering since these files do not actually carry the generated marker. Differential Revision: D103882417 fbshipit-source-id: 5cf428eb688e7c51ff600d923a73a9ddc824c27c
1 parent d4c9316 commit 485468f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

build/fbcode_builder/getdeps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,9 @@ def write_job_for_platform(self, platform, args): # noqa: C901
12441244

12451245
out.write(" - uses: actions/checkout@v6\n")
12461246

1247-
extra_cmake_defines = {}
1247+
extra_cmake_defines = (
1248+
json.loads(args.extra_cmake_defines) if args.extra_cmake_defines else {}
1249+
)
12481250
if use_sccache:
12491251
out.write(" - name: Set up sccache\n")
12501252
out.write(" uses: mozilla-actions/sccache-action@v0.0.9\n")

0 commit comments

Comments
 (0)