mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
Meta: Use a common function for getting build directory
Between WPT.sh and ladybird.sh. This is useful to me as I set my default build configuration to Debug, and have been hacking around with the WPT script to align with this configuration.
This commit is contained in:
parent
16f68ab1bd
commit
7ea17d2fea
Notes:
github-actions[bot]
2024-10-09 10:32:49 +00:00
Author: https://github.com/shannonbooth
Commit: 7ea17d2fea
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1687
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 31 additions and 14 deletions
|
@ -60,3 +60,26 @@ ensure_ladybird_source_dir() {
|
|||
export LADYBIRD_SOURCE_DIR
|
||||
fi
|
||||
}
|
||||
|
||||
get_build_dir() {
|
||||
ensure_ladybird_source_dir
|
||||
|
||||
# Note: Keep in sync with buildDir defaults in CMakePresets.json
|
||||
case "$1" in
|
||||
"default")
|
||||
BUILD_DIR="${LADYBIRD_SOURCE_DIR}/Build/ladybird"
|
||||
;;
|
||||
"Debug")
|
||||
BUILD_DIR="${LADYBIRD_SOURCE_DIR}/Build/ladybird-debug"
|
||||
;;
|
||||
"Sanitizer")
|
||||
BUILD_DIR="${LADYBIRD_SOURCE_DIR}/Build/ladybird-sanitizers"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown BUILD_PRESET: '$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "${BUILD_DIR}"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue