Skip to content

Commit

Permalink
Add more modern libdispatch implementation to the script
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa committed Mar 10, 2023
1 parent 1229f99 commit 8ce8fbc
Showing 1 changed file with 10 additions and 33 deletions.
43 changes: 10 additions & 33 deletions clang-setup
Expand Up @@ -13,16 +13,12 @@ ${SUDO} mkdir -p /usr/GNUstep/Local/Library/Libraries
${SUDO} mkdir -p /usr/GNUstep/Local/Library/Headers

# cleanup
#sudo rm -rf /tmp/libdispatch
#sudo rm -rf /tmp/libpwq
#sudo rm -rf /tmp/libkqueue
sudo rm -rf /tmp/libdispatch
sudo rm -rf /tmp/libobjc2

# pull
git clone --recursive https://github.com/gnustep/libobjc2.git
#git clone https://github.com/mheily/libpwq.git
# git clone https://github.com/mheily/libkqueue.git
#git clone https://github.com/nickhutchinson/libdispatch.git
git clone https://github.com/apple/swift-corelibs-libdispatch.git libdispatch

# set vars
export CC=${CLANG}
Expand All @@ -37,33 +33,14 @@ cmake -DGNUSTEP_INSTALL_TYPE=LOCAL ../
make -j${CPUS}
${SUDO} -E make install && ${SUDO} ldconfig

#echo "======== Installing libpwq..."
#cd /tmp/libpwq
#mkdir build
#cd build
#cmake ../
#make -j${CPUS}
#${SUDO} -E make install && ${SUDO} ldconfig

# echo "======== Installing libkqueue..."
# cd /tmp/libkqueue
# mkdir build
# cd build
# cmake ../
# make -j${CPUS}
# ${SUDO} -E make install
# if [ $? == 0 ]; then
# ${SUDO} ldconfig
# fi

#echo "======== Installing libdispatch..."
#cd /tmp/libdispatch
#rm -rf build
#mkdir build
#cd build
#../configure
#make -j${CPUS}
#${SUDO} -E make install && ${SUDO} ldconfig
echo "======== Installing libdispatch..."
cd /tmp/libdispatch
rm -rf build
mkdir build
cd build
cmake ../
make -j${CPUS}
${SUDO} -E make install && ${SUDO} ldconfig

echo "Done."

1 comment on commit 8ce8fbc

@triplef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gcasa you probably want this patch as well if you’re using Apple’s official libdispatch (which I would recommend as it’s in active development):
https://github.com/gnustep/tools-windows-msvc/blob/master/patches/libdispatch-own-blocksruntime.patch

There’s a discussion here about moving from the libobjc2 blocks runtime to the one from libdispatch, which would make this unnecessary:
gnustep/libobjc2#199

Please sign in to comment.