Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Jan 25, 2025
1 parent d897c46 commit 881d525
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1205,10 +1205,11 @@ def generate_build_tree(
raise BuildError("unknown python arch")
elif is_macOS():
for kvp in cmake_extra_args:

Check warning

Code scanning / lintrunner

RUFF/B007 Warning

Loop control variable kvp not used within loop body.
See https://docs.astral.sh/ruff/rules/unused-loop-control-variable

Check failure

Code scanning / CodeQL

Suspicious unused loop iteration variable Error

For loop variable 'kvp' is not used in the loop body.
key,value = s.split('=')
if key == CMAKE_OSX_ARCHITECTURES and len(value.split(';')) == 2:
key, value = s.split("=")

Check failure

Code scanning / lintrunner

RUFF/F821 Error

if key == "CMAKE_OSX_ARCHITECTURES" and len(value.split(";")) == 2:
triplet = "universal2-osx"
if triplet:
log.info(f"setting target triplet to {triplet}")
add_default_definition(cmake_extra_defines, "VCPKG_TARGET_TRIPLET", triplet)

# By default on Windows we currently support only cross compiling for ARM/ARM64
Expand Down Expand Up @@ -1391,7 +1392,7 @@ def generate_build_tree(
raise BuildError("You must set dml_path or dml_external_project when building with the GDK.")

if is_macOS() and not args.android:
cmake_args += ["-DCMAKE_OSX_ARCHITECTURES=" + args.osx_arch]
add_default_definition(cmake_extra_defines, "CMAKE_OSX_ARCHITECTURES", args.osx_arch)
if args.apple_deploy_target:
cmake_args += ["-DCMAKE_OSX_DEPLOYMENT_TARGET=" + args.apple_deploy_target]
# Code sign the binaries, if the code signing development identity and/or team id are provided
Expand Down

0 comments on commit 881d525

Please sign in to comment.