tcc build for linux, basic changes
This commit is contained in:
16
build.sh
Normal file → Executable file
16
build.sh
Normal file → Executable file
@@ -3,15 +3,7 @@ cd "$(dirname "$0")"
|
|||||||
if [ ! -d build ]; then
|
if [ ! -d build ]; then
|
||||||
mkdir build
|
mkdir build
|
||||||
fi
|
fi
|
||||||
pushd build
|
cd build
|
||||||
clang ../src/testing/testing_main.c -g
|
# clang ../src/testing/testing_main.c -o testing_main -I../src/ -ldl -lm -lbacktrace -g -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers -Wno-single-bit-bitfield-constant-conversion -fdiagnostics-absolute-paths -Wno-writable-strings -Wno-unsequenced
|
||||||
popd
|
tcc $(realpath ../src/testing/testing_main.c) -o testing_main -I$(realpath ../src/) -ldl -lm -Wall -Wextra
|
||||||
|
./testing_main
|
||||||
# if [ ! -f build/build_tool.exe ]; then
|
|
||||||
# echo build_tool rebuild
|
|
||||||
# cd build
|
|
||||||
# clang ../src/meta/build_tool.c -ldl -lbacktrace -o build_tool.exe -g -fdiagnostics-absolute-paths -Wno-single-bit-bitfield-constant-conversion -Wno-unsequenced
|
|
||||||
# cd ..
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# ./build/build_tool.exe clang ../build_file.c -o build_file.exe -ldl -lm -lbacktrace -g -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers -Wno-single-bit-bitfield-constant-conversion -fdiagnostics-absolute-paths -Wno-writable-strings -Wno-unsequenced
|
|
||||||
@@ -259,12 +259,14 @@ int IsDebuggerPresent(void);
|
|||||||
#elif PLATFORM_WASM
|
#elif PLATFORM_WASM
|
||||||
void wasm_trap(void);
|
void wasm_trap(void);
|
||||||
#define debug__break() wasm_trap()
|
#define debug__break() wasm_trap()
|
||||||
|
#elif PLATFORM_TCC
|
||||||
|
#define debug__break() raise(SIGTRAP)
|
||||||
#else
|
#else
|
||||||
#define debug__break() __builtin_trap()
|
#define debug__break() __builtin_trap()
|
||||||
#endif
|
#endif
|
||||||
#define debug_break() (debug__break(), 1)
|
#define debug_break() (debug__break(), 1)
|
||||||
|
|
||||||
#if PLATFORM_WASM
|
#if PLATFORM_WASM | PLATFORM_TCC
|
||||||
#define gb_thread
|
#define gb_thread
|
||||||
#elif PLATFORM_GCC | PLATFORM_CLANG
|
#elif PLATFORM_GCC | PLATFORM_CLANG
|
||||||
#define gb_thread __thread
|
#define gb_thread __thread
|
||||||
|
|||||||
Reference in New Issue
Block a user