Skip to content

Conversation

@vineelko
Copy link
Contributor

@vineelko vineelko commented Dec 22, 2025

The Patina Readiness Tool repo comprises multiple binaries with varying degrees of customization to the build and linker flags based on the target and platform. Most of the up-to-date Makefile.toml files are already in the repo. This is a one-time baseline sync from that repo back to patina-devops.

@vineelko vineelko force-pushed the users/vineelko/readiness_makefile_fix_1222 branch from fe65ac7 to 3bf0c2f Compare December 22, 2025 18:22
description = "Builds the Windows aarch64 DXE Readiness Validation binary."
condition = { platforms = ["windows"]}
command = "cargo"
args = [ "build", "-p", "dxe_readiness_validator", "@@split(AARCH64_STD_WINDOWS_TARGET, )", "${@}", ]
Copy link
Contributor

@Javagedes Javagedes Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this possible? Cross compilation support when it comes to target triples where there is an "STD" that relies on the operating system (e.g. a target triple with an OS) is not exactly supported from my understanding.

e.g. I can't really compile an aarch64-unknown-linux target on a aarch64-pic-windows-msvc target).

Seems like you should just not specify a target and let the compiler auto pick the host target.

Just have a generic build-validation-host-binary

If you need to set some feature flags or something based off the target tripple then you could not specify the target, then have a duckscript use the CARGO_MAKE_RUST_TARGET_TRIPLE to set feature flags.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then CI would just compile a different target of the binary based off the host its being run on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that, without explicitly specifying the target triple, the host binaries are produced under target/debug/... instead of target/<triple>/debug. This is usually not a problem for a normal development workflow, but if we want to release all flavors of host binaries (x64 and aarch64) using a workflow like .github/workflows/publish-binaries.yml, I am not sure how to identify each flavor when copying the artifacts.

cp target/x86_64-pc-windows-msvc/debug/dxe_readiness_validator.exe artifacts/validator/dxe_readiness_validator.exe
cp target/x86_64-pc-windows-msvc/debug/dxe_readiness_validator.pdb artifacts/validator/dxe_readiness_validator.pdb
cp target/aarch64-pc-windows-msvc/debug/dxe_readiness_validator.exe artifacts/validator/dxe_readiness_validator.exe
cp target/aarch64-pc-windows-msvc/debug/dxe_readiness_validator.pdb artifacts/validator/dxe_readiness_validator.pdb

So the patina-readiness-tool repo already has an explicit way of specifying the target triple for consistency(across platforms/arch), and unfortunately the makefile.toml in patina-devops is out of sync. This is being addressed in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I see two routes -

  1. Have a duckscript call that calls either rustc -vV or cargo metadata (see below) to grab the target triple, then set the triple so that it goes in the folder
output = exec cargo metadata --format-version 1 --no-deps --manifest-path ${repo}/Cargo.toml
if not eq ${output.code} 0
            echo "Error running cargo metadata on ${repo}"
            exit 1
        end

        metadata = json_parse --collection ${output.stdout}
  1. do the copying based off the image in the github workflow. e.g. if the workflow is running on windows-x86 image then copy it to the right target triple folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of duck script 😄 and as mentioned before this is mainly to address below

  1. To make it consistent for the publish binaries workflow to package the artifacts
  2. Sync back what we already have in the patina-readiness-tool repo as a baseline.

Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>
@vineelko vineelko force-pushed the users/vineelko/readiness_makefile_fix_1222 branch from 3bf0c2f to 11e19dd Compare January 8, 2026 00:22
@vineelko vineelko changed the title Readiness: Makefile: Remove test-common task and update targets Readiness: Baseline Makefile.toml sync from patina-readiness-tool Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants