Skip to content

Commit

Permalink
UefiPayloadPkg: Fix package build failure
Browse files Browse the repository at this point in the history
When building with "build -p pkgname/pkgname.dsc -a IA32 -a X64",
it will fail as BUILD_ARCH was not defined and output directory was
unexpectedly as "UefiPayloadPkg$(BUILD_ARCH)"

As many platforms have adopted UPL build (UniversalPayloadBuild.py)
which always defines "BUILD_ARCH", the fix is mainly to keep this
backward compatibility (BUILD_ARCH always defined), but also support
BUILD_ARCH undefined scenario.

Signed-off-by: Chasel Chiu <[email protected]>
  • Loading branch information
ChaselChiu committed Feb 21, 2025
1 parent c7f8251 commit 58fcf28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UefiPayloadPkg/UefiPayloadPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
SUPPORTED_ARCHITECTURES = IA32|X64
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT
!ifdef BUILD_ARCH
OUTPUT_DIRECTORY = Build/UefiPayloadPkg$(BUILD_ARCH)
!else
OUTPUT_DIRECTORY = Build/UefiPayloadPkg
!endif
FLASH_DEFINITION = UefiPayloadPkg/UefiPayloadPkg.fdf
PCD_DYNAMIC_AS_DYNAMICEX = TRUE

Expand Down

0 comments on commit 58fcf28

Please sign in to comment.