Skip to content

Commit cae4caa

Browse files
niwci
authored andcommitted
[TwitterTextEditor] Add --enable-libffi-alloc on arm64 platform.
**Problems** `make doc` task can't run on arm64 platform due to one of dependency gem `ffi` used from one of library `sassc` gem that `jazzy` is using is not workign on arm64 platform. **Solution** Add `--enable-libffi-alloc` option to `ffi` gem installation to workaround the problem. JIRA Issues: IOS-110945 Differential Revision: https://phabricator.twitter.biz/D803771
1 parent 302433b commit cae4caa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BUILD_SCHEME = $(NAME)-Package
88
BUILD_SDK = iphonesimulator
99
BUILD_DERIVED_DATA_PATH = .build/derived_data
1010

11-
# Use `use `xcodebuild -showdestinations -scheme ...` for the destinations.
11+
# Use `xcodebuild -showdestinations -scheme ...` for the destinations.
1212
# See also <https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md>
1313
# for commonly available destinations.
1414
TEST_DESTINATION = platform=iOS Simulator,name=iPhone 11
@@ -35,7 +35,11 @@ all: correct test
3535
clean:
3636
git clean -dfX
3737

38+
# NOTE: Apple Silicon workaround
39+
# On Apple Silicon platform, `--enable-libffi-alloc` is required to use `ffi` gem from `sassc` gem,
40+
# which is one of dependencies of `jazzy` gem used for documentation.
3841
.bundle: Gemfile
42+
if [[ $$(uname -m) == 'arm64' ]]; then $(BUNDLE) config build.ffi --enable-libffi-alloc; fi
3943
$(BUNDLE) install --path "$@"
4044
touch "$@"
4145

0 commit comments

Comments
 (0)