|
23 | 23 |
|
24 | 24 |
|
25 | 25 | if [[ "$(uname)" == "Darwin" ]]; then
|
26 |
| - # Firefox currently does not build on 10.15 out of the box - it requires SDK for 10.12. |
27 |
| - # Make sure the SDK is out there. |
28 |
| - if ! [[ -d $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk ]]; then |
29 |
| - echo "As of Dec 2020, Firefox does not build on Mac without ${MACOS_SDK_VERSION} SDK." |
30 |
| - echo "Download XCode ${XCODE_VERSION_WITH_REQUIRED_SDK_VERSION} from https://developer.apple.com/download/more/ and" |
31 |
| - echo "extract SDK to $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk" |
32 |
| - echo "" |
33 |
| - echo "More info: https://firefox-source-docs.mozilla.org/setup/macos_build.html" |
34 |
| - exit 1 |
| 26 | + if [[ $(uname -m) == "arm64" ]]; then |
| 27 | + # Building on Apple Silicon requires XCode12.2 and does not require any extra SDKs. |
| 28 | + if ! [[ -d "/Applications/Xcode12.2.app" ]]; then |
| 29 | + echo "As of Jan 2021, building Firefox on Apple Silicon requires XCode 12.2" |
| 30 | + echo "Make sure there's an /Applications/Xcode12.2.app" |
| 31 | + echo "Download XCode from https://developer.apple.com/download/more/" |
| 32 | + echo "" |
| 33 | + exit 1 |
| 34 | + fi |
| 35 | + export DEVELOPER_DIR=/Applications/Xcode12.2.app/Contents/Developer |
35 | 36 | else
|
36 |
| - echo "-- configuting .mozconfig with ${MACOS_SDK_VERSION} SDK path" |
37 |
| - echo "ac_add_options --with-macos-sdk=$HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk/" > .mozconfig |
| 37 | + # Firefox currently does not build on 10.15 out of the box - it requires SDK for 10.12. |
| 38 | + # Make sure the SDK is out there. |
| 39 | + if ! [[ -d $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk ]]; then |
| 40 | + echo "As of Dec 2020, Firefox does not build on Mac without ${MACOS_SDK_VERSION} SDK." |
| 41 | + echo "Download XCode ${XCODE_VERSION_WITH_REQUIRED_SDK_VERSION} from https://developer.apple.com/download/more/ and" |
| 42 | + echo "extract SDK to $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk" |
| 43 | + echo "" |
| 44 | + echo "More info: https://firefox-source-docs.mozilla.org/setup/macos_build.html" |
| 45 | + exit 1 |
| 46 | + else |
| 47 | + echo "-- configuting .mozconfig with ${MACOS_SDK_VERSION} SDK path" |
| 48 | + echo "ac_add_options --with-macos-sdk=$HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk/" > .mozconfig |
| 49 | + fi |
38 | 50 | fi
|
39 | 51 | echo "-- building on Mac"
|
40 | 52 | elif [[ "$(uname)" == "Linux" ]]; then
|
|
0 commit comments