Skip to content

Commit

Permalink
Use the arm64 dsymutil on Mac M1 machines (flutter#42533)
Browse files Browse the repository at this point in the history
Use the right binary architectures on scripts running dsymutil.

This is to fix the problem of bad architecture binary for builds running on dart internal: flutter/flutter#128098

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
godofredoc authored Jun 5, 2023
1 parent 57b801f commit 51928f2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion sky/tools/create_embedder_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# found in the LICENSE file.

import argparse
import platform
import subprocess
import shutil
import sys
Expand All @@ -14,8 +15,9 @@
os.path.join(os.path.realpath(__file__), '..', '..', '..', '..')
)

ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', 'mac-x64',
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH,
'clang', 'bin', 'dsymutil'
)

Expand Down
4 changes: 3 additions & 1 deletion sky/tools/create_full_ios_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@

import argparse
import os
import platform
import shutil
import subprocess
import sys

from create_xcframework import create_xcframework # pylint: disable=import-error

ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', 'mac-x64',
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH,
'clang', 'bin', 'dsymutil'
)

Expand Down
4 changes: 3 additions & 1 deletion sky/tools/create_ios_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
# found in the LICENSE file.

import argparse
import platform
import subprocess
import shutil
import sys
import os

from create_xcframework import create_xcframework # pylint: disable=import-error

ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', 'mac-x64',
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH,
'clang', 'bin', 'dsymutil'
)

Expand Down
4 changes: 3 additions & 1 deletion sky/tools/create_macos_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# found in the LICENSE file.

import argparse
import platform
import subprocess
import shutil
import sys
Expand All @@ -14,8 +15,9 @@
os.path.join(os.path.realpath(__file__), '..', '..', '..', '..')
)

ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', 'mac-x64',
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH,
'clang', 'bin', 'dsymutil'
)

Expand Down

0 comments on commit 51928f2

Please sign in to comment.