Skip to content

Commit dd3f484

Browse files
jbower-fbmeta-codesync[bot]
authored andcommitted
Fix OSS builds (removes 3.12mp build)
Summary: This diff was generated by UTC AI agent for your convenience on top of T. **This diff was generated by UTC AI agent on behalf of jbower for T. If the diff quality is poor, consider contacting the user to provide clearer instructions on the task.** - If you are happy with the changes, commandeer it if minor edits are needed. (**we encourage commandeer to get the diff credit**) - If you are not happy with the changes, please comment on the diff with clear actions and send it back to the author. Racer will pick it up and re-generate. - If you really feel the UTC AI Agent is not helping with this change (alas, some complex changes are hard for AI) feel free to abandon this diff. I think it's reasonable to not have an OSS build of 3.12 - in practice nobody is ever going to use this oddity as it requires Meta Python. CinderX with stock CPython is what we expect going forwards. I'm trying to reconcile a few constraints here without making the code too complicated: * For PGO with LLVM we need to have llvm-ar installed, but this isn't available on Sandcastle or Ubuntu Latest (on GitHub). * It's easyish to install GCC on Sandcastle. * GCC-13 is available on Ubuntu Latest in GitHub but installing another version is annoying because our GitHub workflow for getdeps is autogenerated. * GCC-13 is sufficient for CinderX + 3.14 but GCC-14 is needed for CinderX + 3.12 (something seems to have been fixed around headers for atomics when mixing C + C++). So, making GCC-13 a minimum requirement for OSS builds is good enough to get PGO builds working on Sandcastle + GitHub provided we only target 3.14+. Reviewed By: itamaro Differential Revision: D88570106 fbshipit-source-id: 7151be4bda9f754d296bf56f20fba90615918a54
1 parent cb389b5 commit dd3f484

4 files changed

Lines changed: 6 additions & 210 deletions

File tree

.github/workflows/getdeps-3_12mp-linux.yml

Lines changed: 0 additions & 166 deletions
This file was deleted.

build/fbcode_builder/manifests/cinderx-3_12mp

Lines changed: 0 additions & 24 deletions
This file was deleted.

build/fbcode_builder/manifests/meta-python-3_12

Lines changed: 0 additions & 18 deletions
This file was deleted.

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
SOURCE_DIR = os.path.join(CHECKOUT_ROOT_DIR, "cinderx")
3131
PYTHON_LIB_DIR = os.path.join(SOURCE_DIR, "PythonLib")
3232

33+
MIN_GCC_VERSION = 13
34+
3335

3436
@lru_cache(maxsize=1)
3537
def get_compiler() -> tuple[str, str]:
@@ -63,11 +65,13 @@ def get_compiler() -> tuple[str, str]:
6365
major_version = int(match.group(1))
6466
print(f"Found GCC version {major_version}.{match.group(2)}")
6567

66-
if major_version >= 14:
68+
if major_version >= MIN_GCC_VERSION:
6769
print(f"Using GCC: {gcc_path}, {gxx_path}")
6870
return (gcc_path, gxx_path)
6971
else:
70-
print(f"GCC version {major_version} < 14, checking for Clang")
72+
print(
73+
f"GCC version {major_version} < {MIN_GCC_VERSION}, checking for Clang"
74+
)
7175
except (subprocess.SubprocessError, subprocess.TimeoutExpired) as e:
7276
print(f"Failed to determine GCC version: {e}, checking for Clang")
7377

0 commit comments

Comments
 (0)