Skip to content

Commit

Permalink
Resolve comilation issue for darwin-framework-tool on M1 (#21761)
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton36 authored and pull[bot] committed Aug 4, 2023
1 parent 856f0a8 commit 1068794
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/build/build_darwin_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import argparse
import os
from subprocess import PIPE, Popen
import platform


def run_command(command):
Expand All @@ -41,7 +42,18 @@ def build_darwin_framework(args):
if not os.path.exists(abs_path):
os.mkdir(abs_path)

command = ['xcodebuild', '-scheme', args.target, '-sdk', 'macosx', '-project', args.project_path, '-derivedDataPath', abs_path]
command = [
'xcodebuild',
'-scheme',
args.target,
'-sdk',
'macosx',
'-project',
args.project_path,
'-derivedDataPath',
abs_path,
"PLATFORM_PREFERRED_ARCH={}".format(platform.machine())
]
command_result = run_command(command)

print("Build Framework Result: {}".format(command_result))
Expand Down

0 comments on commit 1068794

Please sign in to comment.