* fix folly

* wip

* wip

* instead of moving the build directory, let's just sanitize facebook's regexes

* lols in apfs

---------

Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
Max Howell 2023-10-02 17:11:43 -04:00 committed by GitHub
parent 4826ea0aa8
commit 6503b1b827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,23 +26,28 @@ build:
dependencies: dependencies:
cmake.org: ^3.0.2 cmake.org: ^3.0.2
freedesktop.org/pkg-config: ^0.29 freedesktop.org/pkg-config: ^0.29
working-directory:
/tmp/xyz.tea.folly
# ^^ facebook use a shitty custom regex function to remove sources that
# shouldnt be compiled from the library target. They start with *all sources*
# our default build directory has a `+` in it which breaks facebooks
# piss awful code.
#TODO dont use exotic characters in our build directories
script: script:
- test -d xyz.tea.srcs && rm -rf xyz.tea.srcs # folly uses the path to build as part of a regex, but out paths have "+"s in them.
- mv $SRCROOT xyz.tea.srcs # don't mess up the intentional newline
- cmake $ARGS -DBUILD_SHARED_LIBS=ON -S xyz.tea.srcs -B shared - run: |
sed -i.bak -E -f $PROP CMakeLists.txt
rm CMakeLists.txt.bak
prop: |
/^REMOVE_MATCHES_FROM_LISTS\(files hfiles/ {
i\\
string(REPLACE "+" "\\\\\\\\+" ESCAPED_FOLLY_DIR "\\\${FOLLY_DIR}")
}
s/\^\\\$\{FOLLY_DIR\}/^\\\$\{ESCAPED_FOLLY_DIR\}/g
- cmake $ARGS -DBUILD_SHARED_LIBS=ON -S . -B shared
- cmake --build shared - cmake --build shared
- cmake --install shared - cmake --install shared
- cmake $ARGS -DBUILD_SHARED_LIBS=OFF -S xyz.tea.srcs -B static - cmake $ARGS -DBUILD_SHARED_LIBS=OFF -S . -B static
- cmake --build static - cmake --build static
- run: cp /tmp/xyz.tea.folly/static/libfolly.a libfollybenchmark.a
- run: cp $SRCROOT/static/libfolly.a libfollybenchmark.a
working-directory: ${{prefix}}/static/folly working-directory: ${{prefix}}/static/folly
- run: | - run: |