#!/bin/sh

build_dir=$3

RT_LIB_DIR=$Y_SYSROOT/lib/clang/19/lib/$Y_TRIPLE

cd $build_dir
cmake --build . -t install -j >/dev/null

mkdir -p $RT_LIB_DIR
cd $RT_LIB_DIR
ln -sf ../../../../yggdrasil/libclang_rt.builtins-$Y_ARCH.a libclang_rt.builtins.a
