Skip to content

Commit

Permalink
Update build_tarballs.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jun 15, 2024
1 parent c6b26dd commit dfe5f9f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .packaging/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ NATIVE_CMAKE_FLAGS+=(-DCMAKE_INSTALL_PREFIX=${host_prefix})
# Tell CMake where LLVM is
NATIVE_CMAKE_FLAGS+=(-DLLVM_DIR="${host_prefix}/lib/cmake/llvm")
NATIVE_CMAKE_FLAGS+=(-DBC_LOAD_FLAGS="-target ${target} --sysroot=/opt/${target}/${target}/sys-root --gcc-toolchain=/opt/${target}")
if [[ "${target}" == *mingw* ]]; then
NATIVE_CMAKE_FLAGS+=(-DCMAKE_CPP_FLAGS=-pthread)
NATIVE_CMAKE_FLAGS+=(-DCMAKE_C_FLAGS=-pthread)
fi
cmake -B build-native -S enzyme -GNinja "${NATIVE_CMAKE_FLAGS[@]}"
Expand Down Expand Up @@ -88,6 +92,12 @@ if [[ "${target}" == x86_64-apple* ]]; then
CMAKE_FLAGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.12)
fi
fi
if [[ "${target}" == *mingw* ]]; then
CMAKE_FLAGS+=(-DCMAKE_CPP_FLAGS=-pthread)
CMAKE_FLAGS+=(-DCMAKE_C_FLAGS=-pthread)
CMAKE_FLAGS+=(-DCMAKE_SHARED_LINKER_FLAGS=-pthread)
CMAKE_FLAGS+=(-DCMAKE_EXE_LINKER_FLAGS=-pthread)
fi
echo ${CMAKE_FLAGS[@]}
cmake -B build -S enzyme -GNinja ${CMAKE_FLAGS[@]}
Expand Down

0 comments on commit dfe5f9f

Please sign in to comment.