Skip to content

Commit ae8e485

Browse files
[web] Fix Web SDK build on macOS (flutter#183549)
Before this, I was getting a bunch of errors like this while trying to run `felt build` on my Macbook. ``` ../../flutter/buildtools/mac-arm64/clang/bin/clang++ -MMD -MF clang_arm64/obj/flutter/fml/fml.endianness.o.d -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_AVAILABILITY=1 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DFLUTTER_RUNTIME_MODE_DEBUG=1 -DFLUTTER_RUNTIME_MODE_PROFILE=2 -DFLUTTER_RUNTIME_MODE_RELEASE=3 -DFLUTTER_RUNTIME_MODE_JIT_RELEASE=4 -DDART_LEGACY_API=\[\[deprecated\]\] -DFLUTTER_RUNTIME_MODE=1 -DFLUTTER_JIT_RUNTIME=1 -I../.. -Iclang_arm64/gen -I../../flutter/third_party/libcxxabi/include -I../../flutter/build/secondary/flutter/third_party/libcxx/config -I../../flutter -I../../third_party/abseil-cpp -fno-strict-aliasing -fstack-protector-all --target=arm64-apple-macos -arch arm64 -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-psabi -Wno-implicit-int-float-conversion -Wno-deprecated-copy -Wno-deprecated-literal-operator -Wno-unqualified-std-cast-call -Wno-nontrivial-memcall -Wno-non-c-typedef-for-linkage -Wno-range-loop-construct -Wunguarded-availability -fdebug-prefix-map=/Users/het/Projects/flutter/engine/src/= -no-canonical-prefixes -fvisibility=hidden -Wstring-conversion -Wnewline-eof -O2 -fno-ident -fdata-sections -ffunction-sections -flto -g2 -Wunreachable-code -fvisibility-inlines-hidden -std=c++20 -Wno-deprecated-this-capture -fno-modules -Xclang -fno-cxx-modules -fno-rtti -nostdinc++ -I../../flutter/third_party/libcxx/include -I../../flutter/third_party/libcxxabi/include -nostdinc++ -fvisibility=hidden -fno-exceptions -stdlib=libc++ -isysroot ../../flutter/prebuilts/SDKs/MacOSX15.5.sdk -mmacosx-version-min= -c ../../flutter/fml/endianness.cc -o clang_arm64/obj/flutter/fml/fml.endianness.o clang++: error: missing version number in '-mmacosx-version-min=' ``` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent 544e303 commit ae8e485

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • engine/src/flutter/tools

engine/src/flutter/tools/gn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,9 @@ def to_gn_wasm_args(args, gn_args):
898898
gn_args['skia_canvaskit_profile_build'] = args.runtime_mode == 'profile'
899899
gn_args['flutter_prebuilt_dart_sdk'] = True
900900

901+
if get_host_os() == 'mac':
902+
gn_args.update(setup_apple_sdks())
903+
901904

902905
def parse_args(args):
903906
args = args[1:]

0 commit comments

Comments
 (0)