Skip to content

Commit 8043842

Browse files
author
gd.zhou
committed
[feature] support github ci compile folly
1 parent adec4ab commit 8043842

23 files changed

Lines changed: 11 additions & 6 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,6 @@ cmake-build-*
9797
third-party/folly/
9898
.cache
9999
*.sublime-*
100+
_build_folly/extracted/
101+
_build_folly/installed/
102+
third-party/folly-*

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,33 +2428,35 @@ checkout_folly:
24282428
if [ -e third-party/folly ]; then \
24292429
cd third-party/folly && ${GIT_COMMAND} fetch origin; \
24302430
else \
2431-
cd third-party && ${GIT_COMMAND} clone https://github.com/facebook/folly.git; \
2431+
cp ./_build_folly/downloads/folly-beacd86d6.tar.gz ./third-party && cd third-party && tar -xzvf folly-beacd86d6.tar.gz; \
24322432
fi
24332433
@# Pin to a particular version for public CI, so that PR authors don't
24342434
@# need to worry about folly breaking our integration. Update periodically
2435-
cd third-party/folly && git reset --hard beacd86d63cd71c904632262e6c36f60874d78ba
2435+
# cd third-party/folly && git reset --hard beacd86d63cd71c904632262e6c36f60874d78ba
24362436
@# A hack to remove boost dependency.
24372437
@# NOTE: this hack is only needed if building using USE_FOLLY_LITE
24382438
perl -pi -e 's/^(#include <boost)/\/\/$$1/' third-party/folly/folly/functional/Invoke.h
24392439
@# NOTE: this hack is required for clang in some cases
24402440
perl -pi -e 's/int rv = syscall/int rv = (int)syscall/' third-party/folly/folly/detail/Futex.cpp
24412441
@# NOTE: this hack is required for gcc in some cases
24422442
perl -pi -e 's/(__has_include.<experimental.memory_resource>.)/__cpp_rtti && $$1/' third-party/folly/folly/memory/MemoryResource.h
2443+
cd ./_build_folly/downloads && cat boost-boost_1_78_0.tar.gz-* > boost-boost_1_78_0.tar.gz
24432444

24442445
CXX_M_FLAGS = $(filter -m%, $(CXXFLAGS))
24452446

24462447
build_folly:
2447-
FOLLY_INST_PATH=`cd third-party/folly; $(PYTHON) build/fbcode_builder/getdeps.py show-inst-dir`; \
2448+
FOLLY_INST_PATH=`cd third-party/folly; $(PYTHON) build/fbcode_builder/getdeps.py --scratch-path ../../_build_folly show-inst-dir`; \
24482449
if [ "$$FOLLY_INST_PATH" ]; then \
24492450
rm -rf $${FOLLY_INST_PATH}/../../*; \
24502451
else \
24512452
echo "Please run checkout_folly first"; \
24522453
false; \
24532454
fi
24542455
# Restore the original version of Invoke.h with boost dependency
2455-
cd third-party/folly && ${GIT_COMMAND} checkout folly/functional/Invoke.h
2456+
cd _build_folly && ${GIT_COMMAND} checkout .
2457+
# cd third-party/folly && ${GIT_COMMAND} checkout folly/functional/Invoke.h
24562458
cd third-party/folly && \
2457-
CXXFLAGS=" $(CXX_M_FLAGS) -DHAVE_CXX11_ATOMIC " $(PYTHON) build/fbcode_builder/getdeps.py build --no-tests
2459+
CXXFLAGS=" $(CXX_M_FLAGS) -DHAVE_CXX11_ATOMIC " $(PYTHON) build/fbcode_builder/getdeps.py --scratch-path ../../_build_folly build --no-tests
24582460

24592461
# ---------------------------------------------------------------------------
24602462
# Build size testing
1.84 MB
Binary file not shown.
2.19 MB
Binary file not shown.
70 MB
Binary file not shown.
55.1 MB
Binary file not shown.
9 MB
Binary file not shown.
6.7 MB
Binary file not shown.
787 KB
Binary file not shown.
52.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)