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
|
||||
mkdir build
|
||||
fi
|
||||
pushd build
|
||||
clang ../src/testing/testing_main.c -g
|
||||
popd
|
||||
|
||||
# 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
|
||||
cd build
|
||||
# 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
|
||||
tcc $(realpath ../src/testing/testing_main.c) -o testing_main -I$(realpath ../src/) -ldl -lm -Wall -Wextra
|
||||
./testing_main
|
||||
@@ -259,12 +259,14 @@ int IsDebuggerPresent(void);
|
||||
#elif PLATFORM_WASM
|
||||
void wasm_trap(void);
|
||||
#define debug__break() wasm_trap()
|
||||
#elif PLATFORM_TCC
|
||||
#define debug__break() raise(SIGTRAP)
|
||||
#else
|
||||
#define debug__break() __builtin_trap()
|
||||
#endif
|
||||
#define debug_break() (debug__break(), 1)
|
||||
|
||||
#if PLATFORM_WASM
|
||||
#if PLATFORM_WASM | PLATFORM_TCC
|
||||
#define gb_thread
|
||||
#elif PLATFORM_GCC | PLATFORM_CLANG
|
||||
#define gb_thread __thread
|
||||
|
||||
Reference in New Issue
Block a user