Skip to content

Commit

Permalink
Removing WORKSPACE dependency from .inf files (#452)
Browse files Browse the repository at this point in the history
- Resolves #446
 - -I compiler option now uses BSA_PATH instead of WORKSPACE.
 - BSA_PATH to be set by acsbuild.sh script.

Signed-off-by: Srikar Josyula <srikar.josyula@arm.com>
  • Loading branch information
SrikarJosyula authored Apr 23, 2024
1 parent a68d837 commit 110a79c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions tools/scripts/acsbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ then
return 0
fi

# Get the path of the current shell script. Based on the script path navigate to sbsa-acs path
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

sbsa_path="$(dirname "$(dirname "$script_dir")")"
echo "sbsa-acs path is: $(realpath "$sbsa_path")"

# Use the default bsa-acs directory
bsa_path="$sbsa_path/../bsa-acs"

# Export BSA_PATH to bsa-acs path. This will be used in .inf files with -I compiler option.
export BSA_PATH=$(realpath "$bsa_path")
echo "bsa-acs path set to: $(realpath "$bsa_path")"

NISTStatus=1;

function build_with_NIST()
Expand Down
2 changes: 1 addition & 1 deletion uefi_app/SbsaAvs.inf
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,4 @@

[BuildOptions]
GCC:*_*_*_ASM_FLAGS = -march=armv8.1-a
GCC:*_*_*_CC_FLAGS = -O0 -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/ -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/sbsa -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/common -I${WORKSPACE}/ShellPkg/Application/bsa-acs/
GCC:*_*_*_CC_FLAGS = -O0 -I${BSA_PATH}/ -I${BSA_PATH}/val/ -I${BSA_PATH}/val/sbsa -I${BSA_PATH}/val/common
2 changes: 1 addition & 1 deletion uefi_app/SbsaAvsNist.inf
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@

[BuildOptions]
GCC:*_*_*_ASM_FLAGS = -march=armv8.1-a
GCC:*_*_*_CC_FLAGS = -O0 -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/ -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/sbsa -I${WORKSPACE}/ShellPkg/Application/bsa-acs/val/common -I${WORKSPACE}/ShellPkg/Application/bsa-acs/
GCC:*_*_*_CC_FLAGS = -O0 -I${BSA_PATH}/ -I${BSA_PATH}/val/ -I${BSA_PATH}/val/sbsa -I${BSA_PATH}/val/common

0 comments on commit 110a79c

Please sign in to comment.