Skip to content

Commit

Permalink
Resolve comilation issue for darwin-framework-tool on M1 (project-chi…
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton36 authored and isiu-apple committed Sep 16, 2022
1 parent 36937e4 commit a781ef9
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 a781ef9

Please sign in to comment.