compilation cleanup
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 16 Nov 2023 16:48:48 +0000 (10:48 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Thu, 16 Nov 2023 16:48:48 +0000 (10:48 -0600)
build.sh
shared/include/bh.h

index 85db1bbb1040a34f7fa85e810a110dd510cff95a..e77e0358b34e5060b8115dbc38087d1fe545d6d1 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -14,9 +14,11 @@ compile_all() {
     ./build.sh $1
     cd ..
 
-    cd runtime
-    ./build.sh $1
-    cd ..
+    if [ ! -z ${ONYX_RUNTIME_LIBRARY+x} ]; then
+        cd runtime
+        ./build.sh $1
+        cd ..
+    fi
 }
 
 package_all() {
@@ -25,7 +27,7 @@ package_all() {
     echo "Installing on '$(uname -a)'"
     echo "Installing core libs"
     [ -d "$DIST_DIR/core" ] && rm -r "$DIST_DIR/core"
-    cp -r ./core/ "$DIST_DIR"
+    cp -r ./core "$DIST_DIR/core"
 
     echo "Installing core tools"
     mkdir -p "$DIST_DIR/bin"
index bb5bf67f369c5c1fdabf7887187707348755c611..1aa320542097197d5e28680fe9033c79321f5f4a 100644 (file)
@@ -1859,7 +1859,7 @@ b32 bh_file_write(bh_file* file, void* buffer, isize buff_size) {
 }
 
 void bh_file_flush(bh_file* file) {
-    #ifdef _BH_LINUX || defined (_BH_DARWIN)
+    #if defined(_BH_LINUX) || defined(_BH_DARWIN)
     fdatasync(file->fd);
     #endif
 }