The dummy_calls function is used to prevent certain functions from being optimized out by the compiler.
It includes calls to 'query_stable' and 'free_result' within a condition that is always false.
This approach ensures these functions are recognized as used by the compiler, particularly under high optimization levels like -O3, where unused functions might otherwise be discarded.
Without this the Github runner macOS 12 builder will fail to find query_stable and free_result.
It is strange because the same code works fine on my own macOS 12 x86_64 and arm64 machines.
To prevent further clang or ClickHouse compile flags from affecting this, the function is defined and called from mainEntryClickHouseLocal.
The dummy_calls function is used to prevent certain functions from being optimized out by the compiler. It includes calls to 'query_stable' and 'free_result' within a condition that is always false. This approach ensures these functions are recognized as used by the compiler, particularly under high optimization levels like -O3, where unused functions might otherwise be discarded.
Without this the Github runner macOS 12 builder will fail to find query_stable and free_result. It is strange because the same code works fine on my own macOS 12 x86_64 and arm64 machines.
To prevent further clang or ClickHouse compile flags from affecting this, the function is defined and called from mainEntryClickHouseLocal.