From 9d11d82e2c383ab259d20d6f208eb9b6536d5047 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Sun, 10 Nov 2024 02:11:52 +0100 Subject: [PATCH] Meta+Toolchain: Move the jakt runtime files into the Toolchain build dir These files are all static libs and source code, and aren't needed to be present at runtime inside the image. --- Meta/CMake/jakt.cmake | 4 ++-- Toolchain/BuildJakt.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Meta/CMake/jakt.cmake b/Meta/CMake/jakt.cmake index 2f4ae46939c..fbbae437421 100644 --- a/Meta/CMake/jakt.cmake +++ b/Meta/CMake/jakt.cmake @@ -23,10 +23,10 @@ if(${PROJECT_NAME} STREQUAL "Lagom") set(JAKT_TARGET_TRIPLE ${arch}-unknown-${os}-unknown) set(JAKT_LIBRARY_BASE "${SerenityOS_SOURCE_DIR}/Toolchain/Local/jakt/lib") else() - set(JAKT_LIBRARY_BASE "${CMAKE_SYSROOT}/usr/local/lib") + set(JAKT_LIBRARY_BASE "${SerenityOS_SOURCE_DIR}/Toolchain/Local/jakt/usr/local/lib") endif() set(JAKT_LIBRARY_DIR "${JAKT_LIBRARY_BASE}/${JAKT_TARGET_TRIPLE}") -set(JAKT_INCLUDE_DIR "${CMAKE_SYSROOT}/usr/local/include/runtime") +set(JAKT_INCLUDE_DIR "${SerenityOS_SOURCE_DIR}/Toolchain/Local/jakt/usr/local/include/runtime") # Make sure the jakt compiler: # - exists diff --git a/Toolchain/BuildJakt.sh b/Toolchain/BuildJakt.sh index 2e80db4aee4..c03d0c71d3b 100755 --- a/Toolchain/BuildJakt.sh +++ b/Toolchain/BuildJakt.sh @@ -255,15 +255,15 @@ build_for() { buildstep "jakt/support/build/$TOOLCHAIN" "$PREFIX/bin/jakt" cross \ --only-support-libs \ - --install-root "$SYSROOT/usr/local" \ + --install-root "$PREFIX/usr/local" \ --target-triple "$JAKT_TARGET" \ --target-links-ak \ -C "$TARGET_CXX" \ -O \ -J "$NPROC" - buildstep "jakt/support/build/$TOOLCHAIN/ranlib" "$TARGET_RANLIB" "$SYSROOT/usr/local/lib/$JAKT_TARGET/libjakt_runtime_$JAKT_TARGET.a" - buildstep "jakt/support/build/$TOOLCHAIN/ranlib" "$TARGET_RANLIB" "$SYSROOT/usr/local/lib/$JAKT_TARGET/libjakt_main_$JAKT_TARGET.a" + buildstep "jakt/support/build/$TOOLCHAIN/ranlib" "$TARGET_RANLIB" "$PREFIX/usr/local/lib/$JAKT_TARGET/libjakt_runtime_$JAKT_TARGET.a" + buildstep "jakt/support/build/$TOOLCHAIN/ranlib" "$TARGET_RANLIB" "$PREFIX/usr/local/lib/$JAKT_TARGET/libjakt_main_$JAKT_TARGET.a" popd }