sapling/build/fbcode_builder
Katie Mancini b7671c5cc9 properly distringuish arm and intel macs
Summary:
M1 macbooks appear to have a default system Python3 version of 3.8.x, with a "universal" executable that incorrectly reports the platform (`platform.machine()`) as `x86_64`. This causes Watchman's `./autogen.sh` which uses `getdeps.py build` to try to build for `x86_64`, which eventually causes linker errors with pre-installed dependencies eg `building for macOS-x86_64 but attempting to link with file built for macOS-arm64`. See also https://github.com/pyinstaller/pyinstaller/issues/5315

PR: https://github.com/facebook/watchman/pull/1081 attempted to resolve by noting a higher python version where platform.machine() does the right thing.

We can work around this though by using `os.uname()` which correctly
distinguishes intel and M1.

```
> python3
>>> platform.machine()
'x86_64'
>>> os.uname().version
'Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000'
```

Reviewed By: mshroyer

Differential Revision: D42182936

fbshipit-source-id: 0d0484a86600da102450e9035c621c01d250cbf7
2023-01-03 13:32:41 -08:00
..
CMake rust: find cargo with find_program to give a better error message when cargo isn't available 2022-10-18 15:26:02 -07:00
getdeps properly distringuish arm and intel macs 2023-01-03 13:32:41 -08:00
manifests rename eden_scm manifest to sapling 2022-11-28 13:52:54 -08:00
patches upgrade rocksdb to 7.7.3 and remove the ROCKSDB_SKIP_THIRDPARTY patch 2022-10-19 23:57:40 -07:00
.gitignore add fbcode_builder sources 2019-04-26 11:31:58 -07:00
getdeps.py automation should use apt-get instead of apt 2022-08-25 15:19:18 -07:00
LICENSE Relicense getdeps from BSD to MIT 2019-10-10 13:20:05 -07:00
README.md update fbcode_builder README to document getdeps.py 2020-09-09 15:40:21 -07:00

Easy builds for Facebook projects

This directory contains tools designed to simplify continuous-integration (and other builds) of Facebook open source projects. In particular, this helps manage builds for cross-project dependencies.

The main entry point is the getdeps.py script. This script has several subcommands, but the most notable is the build command. This will download and build all dependencies for a project, and then build the project itself.

Deployment

This directory is copied literally into a number of different Facebook open source repositories. Any change made to code in this directory will be automatically be replicated by our open source tooling into all GitHub hosted repositories that use fbcode_builder. Typically this directory is copied into the open source repositories as build/fbcode_builder/.

Project Configuration Files

The manifests subdirectory contains configuration files for many different projects, describing how to build each project. These files also list dependencies between projects, enabling getdeps.py to build all dependencies for a project before building the project itself.

Shared CMake utilities

Since this directory is copied into many Facebook open source repositories, it is also used to help share some CMake utility files across projects. The CMake/ subdirectory contains a number of .cmake files that are shared by the CMake-based build systems across several different projects.

Older Build Scripts

This directory also still contains a handful of older build scripts that pre-date the current getdeps.py build system. Most of the other .py files in this top directory, apart from getdeps.py itself, are from this older build system. This older system is only used by a few remaining projects, and new projects should generally use the newer getdeps.py script, by adding a new configuration file in the manifests/ subdirectory.