mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
MacOS is able to run Hello World!
This commit is contained in:
@@ -2,12 +2,21 @@
|
||||
|
||||
release_mode=0
|
||||
|
||||
warnings_to_disable="-Wno-attributes -Wno-implicit-function-declaration -Wno-incompatible-pointer-types"
|
||||
warnings_to_disable="-Wno-attributes -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-switch -Wno-pointer-sign"
|
||||
libraries="-pthread -ldl -lm"
|
||||
other_args=""
|
||||
other_args="-x c"
|
||||
compiler="gcc"
|
||||
|
||||
if [ "$release_mode" -eq "0" ]; then
|
||||
other_args="${other_args} -g -fno-inline-functions -fno-inline-small-functions"
|
||||
other_args="${other_args} -g -fno-inline-functions"
|
||||
fi
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
|
||||
# Set compiler to clang on MacOS
|
||||
# MacOS provides a symlink to clang called gcc, but it's nice to be explicit here.
|
||||
compiler="clang"
|
||||
|
||||
other_args="${other_args} -liconv"
|
||||
fi
|
||||
|
||||
gcc src/main.c ${warnings_to_disable} ${libraries} ${other_args} -o odin
|
||||
${compiler} src/main.c ${warnings_to_disable} ${libraries} ${other_args} -o odin
|
||||
|
||||
Reference in New Issue
Block a user