Skip to content

[vcpkg_find_acquire_program(NINJA).cmake] Update to 1.12.0#38538

Closed
bowenxuuu wants to merge 3 commits intomicrosoft:masterfrom
bowenxuuu:master
Closed

[vcpkg_find_acquire_program(NINJA).cmake] Update to 1.12.0#38538
bowenxuuu wants to merge 3 commits intomicrosoft:masterfrom
bowenxuuu:master

Conversation

@bowenxuuu
Copy link
Copy Markdown
Contributor

Fixes #38494

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented May 3, 2024

IMO it would be good to chose the arm variant on arm64 hosts now. 1.12.0 has arm64 binaries for linux and windows.

Possible patterns (windows, linux):

if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(build_arch $ENV{PROCESSOR_ARCHITEW6432})
else()
set(build_arch $ENV{PROCESSOR_ARCHITECTURE})
endif()
if(build_arch MATCHES "(amd|AMD)64")
set(build_cpu_fam x86_64)
set(build_cpu x86_64)
elseif(build_arch MATCHES "(x|X)86")
set(build_cpu_fam x86)
set(build_cpu i686)
elseif(build_arch MATCHES "^(ARM|arm)64$")
set(build_cpu_fam aarch64)
set(build_cpu armv8)

elseif(CMAKE_HOST_UNIX)
# at this stage, CMAKE_HOST_SYSTEM_PROCESSOR is not defined
execute_process(
COMMAND uname -m
OUTPUT_VARIABLE MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY)
# Show real machine architecture to visually understand whether we are in a native Apple Silicon terminal or running under Rosetta emulation
debug_message("Machine: ${MACHINE}")
if(MACHINE MATCHES "arm64|aarch64")
set(build_cpu_fam aarch64)
set(build_cpu armv8)

@bowenxuuu
Copy link
Copy Markdown
Contributor Author

@xb284524239 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@bowenxuuu
Copy link
Copy Markdown
Contributor Author

bowenxuuu commented May 3, 2024

IMO it would be good to chose the arm variant on arm64 hosts now. 1.12.0 has arm64 binaries for linux and windows.

Possible patterns (windows, linux):

if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(build_arch $ENV{PROCESSOR_ARCHITEW6432})
else()
set(build_arch $ENV{PROCESSOR_ARCHITECTURE})
endif()
if(build_arch MATCHES "(amd|AMD)64")
set(build_cpu_fam x86_64)
set(build_cpu x86_64)
elseif(build_arch MATCHES "(x|X)86")
set(build_cpu_fam x86)
set(build_cpu i686)
elseif(build_arch MATCHES "^(ARM|arm)64$")
set(build_cpu_fam aarch64)
set(build_cpu armv8)

elseif(CMAKE_HOST_UNIX)
# at this stage, CMAKE_HOST_SYSTEM_PROCESSOR is not defined
execute_process(
COMMAND uname -m
OUTPUT_VARIABLE MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY)
# Show real machine architecture to visually understand whether we are in a native Apple Silicon terminal or running under Rosetta emulation
debug_message("Machine: ${MACHINE}")
if(MACHINE MATCHES "arm64|aarch64")
set(build_cpu_fam aarch64)
set(build_cpu armv8)

@dg0yt Hi, thanks for your suggestion. I have added arm64 binaries for linux and windows.

@JonLiu1993 JonLiu1993 self-assigned this May 6, 2024
@JonLiu1993 JonLiu1993 added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label May 6, 2024
@JonLiu1993
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@JonLiu1993
Copy link
Copy Markdown
Contributor

@xb284524239, Thanks for your PR, this is test error log, please take a look.
package-x86-windows-dbg-out.log

@JonLiu1993
Copy link
Copy Markdown
Contributor

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@JonLiu1993 JonLiu1993 marked this pull request as draft May 22, 2024 06:46
@bowenxuuu
Copy link
Copy Markdown
Contributor Author

@xb284524239, Thanks for your PR, this is test error log, please take a look. package-x86-windows-dbg-out.log

@JonLiu1993 The log file above is empty.

@JonLiu1993
Copy link
Copy Markdown
Contributor

@xb284524239, Sorry for my negligence, I have uploaded the latest log:
package-x86-windows-dbg-out.log

@bowenxuuu bowenxuuu closed this May 29, 2024
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Jun 13, 2024
Fixes microsoft#38494

Resurrects microsoft#38538

Co-authored-by: xb284524239 <40262910+xb284524239@users.noreply.github.com>
@BillyONeal
Copy link
Copy Markdown
Member

I'm sorry there was some confusion here. I'll make sure you're credited as a co-author when #39260 merges. Thanks for the submission!

@bowenxuuu
Copy link
Copy Markdown
Contributor Author

bowenxuuu commented Jun 19, 2024

I'm sorry there was some confusion here. I'll make sure you're credited as a co-author when #39260 merges. Thanks for the submission!

@BillyONeal Thanks, and I wish you success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vcpkg-tool-<ninja>] update to <1.12.0>

4 participants