X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vg_compiler.sh;fp=vg_compiler.sh;h=9a60b3df574405b94f3c86aec4ab8583c7839d43;hb=eab2a12beb019cb845af816a6de88c074f88f9bd;hp=a27da4ae00509e05e67850040f471289255dabce;hpb=c9d41059e232eabbcfebc2d7401a2b617a20f630;p=vg.git diff --git a/vg_compiler.sh b/vg_compiler.sh index a27da4a..9a60b3d 100755 --- a/vg_compiler.sh +++ b/vg_compiler.sh @@ -65,7 +65,7 @@ target_os_windows(){ target_platform_include="" if [ $opt_release = true ]; then - target_opts="-O3" + target_opts="-O3 -DVG_RELEASE" else target_opts="-ggdb3" fi @@ -73,7 +73,7 @@ target_os_windows(){ target_os_linux(){ target_ext="" - target_compiler="gcc" + target_compiler="clang" target_libs="-lGL -lglfw3 -lX11 -lXxf86vm -lXrandr -lm -pthread -lXi -ldl" target_libs_steam="-lsteam_api" #target_platform_include="-include $vg_root/platformutils/force_link_glibc_2.23.h" @@ -82,9 +82,9 @@ target_os_linux(){ target_steam_api="libsteam_api.so" target_miniaudio="$vg_root/dep/dr_soft/miniaudio_linux.o" if [ $opt_release = true ]; then - target_opts="-O3" + target_opts="-O3 -DVG_RELEASE" else - target_opts="-O1 -fsanitize=address -ggdb3 -fno-omit-frame-pointer" + target_opts="-O0 -fsanitize=address -ggdb3 -fno-omit-frame-pointer" fi } @@ -95,7 +95,7 @@ precompile_x(){ fi sources="$1" output="-o $2" - cmd="$target_compiler -D_REENTRANT $target_standard $target_opts $target_platform_include + cmd="$target_compiler $target_standard $target_opts $target_platform_include -c $sources $output" @@ -120,7 +120,7 @@ compile_x(){ steam_part="$opt_steam $target_libs_steam" fi - warnings="-Wall -Wstrict-aliasing=3 -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable" + warnings="-Wall -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable" sources="$1 $vg_root/dep/glad/glad.c $target_miniaudio" output="-o $2$target_ext"