mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Ports: Add variables for Toolchain binary directory and cxxfilt
This commit is contained in:
parent
fef83ed47d
commit
8c877664f7
Notes:
sideshowbarker
2024-07-17 10:05:14 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/8c877664f7 Pull-request: https://github.com/SerenityOS/serenity/pull/14283 Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/timschumi
@ -14,6 +14,7 @@ if [ -z "${HOST_CC:=}" ]; then
|
||||
export HOST_READELF="${READELF:=readelf}"
|
||||
export HOST_OBJCOPY="${OBJCOPY:=objcopy}"
|
||||
export HOST_STRIP="${STRIP:=strip}"
|
||||
export HOST_CXXFILT="${CXXFILT:=c++filt}"
|
||||
export HOST_PKG_CONFIG_DIR="${PKG_CONFIG_DIR:=}"
|
||||
export HOST_PKG_CONFIG_SYSROOT_DIR="${PKG_CONFIG_SYSROOT_DIR:=}"
|
||||
export HOST_PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:=}"
|
||||
@ -23,6 +24,7 @@ export SERENITY_SOURCE_DIR="$(realpath "${SCRIPT}/../")"
|
||||
|
||||
if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then
|
||||
export SERENITY_BUILD_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}clang"
|
||||
export SERENITY_TOOLCHAIN_BINDIR="${SERENITY_SOURCE_DIR}/Toolchain/Local/clang/bin"
|
||||
export CC="clang --target=${SERENITY_ARCH}-pc-serenity --sysroot=${SERENITY_BUILD_DIR}/Root"
|
||||
export CXX="clang++ --target=${SERENITY_ARCH}-pc-serenity --sysroot=${SERENITY_BUILD_DIR}/Root"
|
||||
export AR="llvm-ar"
|
||||
@ -30,9 +32,10 @@ if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then
|
||||
export READELF="llvm-readelf"
|
||||
export OBJCOPY="llvm-objcopy"
|
||||
export STRIP="llvm-strip"
|
||||
export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/clang/bin:${HOST_PATH}"
|
||||
export CXXFILT="llvm-cxxfilt"
|
||||
else
|
||||
export SERENITY_BUILD_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}"
|
||||
export SERENITY_TOOLCHAIN_BINDIR="${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin"
|
||||
export CC="${SERENITY_ARCH}-pc-serenity-gcc"
|
||||
export CXX="${SERENITY_ARCH}-pc-serenity-g++"
|
||||
export AR="${SERENITY_ARCH}-pc-serenity-ar"
|
||||
@ -40,9 +43,11 @@ else
|
||||
export READELF="${SERENITY_ARCH}-pc-serenity-readelf"
|
||||
export OBJCOPY="${SERENITY_ARCH}-pc-serenity-objcopy"
|
||||
export STRIP="${SERENITY_ARCH}-pc-serenity-strip"
|
||||
export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/${SERENITY_ARCH}/bin:${HOST_PATH}"
|
||||
export CXXFILT="${SERENITY_ARCH}-pc-serenity-c++filt"
|
||||
fi
|
||||
|
||||
export PATH="${SERENITY_TOOLCHAIN_BINDIR}:${HOST_PATH}"
|
||||
|
||||
export PKG_CONFIG_DIR=""
|
||||
export PKG_CONFIG_SYSROOT_DIR="${SERENITY_BUILD_DIR}/Root"
|
||||
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/usr/local/lib/pkgconfig"
|
||||
|
@ -52,6 +52,7 @@ host_env() {
|
||||
export READELF="${HOST_READELF}"
|
||||
export OBJCOPY="${HOST_OBJCOPY}"
|
||||
export STRIP="${HOST_STRIP}"
|
||||
export CXXFILT="${HOST_CXXFILT}"
|
||||
export PKG_CONFIG_DIR="${HOST_PKG_CONFIG_DIR}"
|
||||
export PKG_CONFIG_SYSROOT_DIR="${HOST_PKG_CONFIG_SYSROOT_DIR}"
|
||||
export PKG_CONFIG_LIBDIR="${HOST_PKG_CONFIG_LIBDIR}"
|
||||
|
Loading…
Reference in New Issue
Block a user