mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[win] Fix some bitrot for building
Needed an option to disable LTO, and a couple of errors that crept in with preprocessor and vulkan improvements.
This commit is contained in:
parent
46a0be837e
commit
91febd50c6
4 changed files with 16 additions and 2 deletions
|
@ -132,6 +132,12 @@ AC_ARG_ENABLE(optimize,
|
||||||
optimize=yes
|
optimize=yes
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(lto,
|
||||||
|
AS_HELP_STRING([--disable-lto], [disable link-time optimizations]),
|
||||||
|
use_lto=$enable_lto,
|
||||||
|
use_lto=yes
|
||||||
|
)
|
||||||
|
|
||||||
if test "x$host_cpu" = xaarch64; then
|
if test "x$host_cpu" = xaarch64; then
|
||||||
simd=neon
|
simd=neon
|
||||||
else
|
else
|
||||||
|
@ -172,7 +178,9 @@ AC_MSG_CHECKING(for optimization)
|
||||||
if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then
|
if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
BUILD_TYPE="$BUILD_TYPE Optimize"
|
BUILD_TYPE="$BUILD_TYPE Optimize"
|
||||||
QF_CC_OPTION(-flto=auto)
|
if test "x$use_lto" = xyes; then
|
||||||
|
QF_CC_OPTION(-flto=auto)
|
||||||
|
fi
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
saved_cflags="$CFLAGS"
|
saved_cflags="$CFLAGS"
|
||||||
dnl CFLAGS=""
|
dnl CFLAGS=""
|
||||||
|
|
|
@ -176,7 +176,11 @@ win_vulkan_create_surface (vulkan_ctx_t *ctx)
|
||||||
static void
|
static void
|
||||||
delete_vulkan_context (vulkan_ctx_t *ctx)
|
delete_vulkan_context (vulkan_ctx_t *ctx)
|
||||||
{
|
{
|
||||||
|
if (ctx->presentation) {
|
||||||
|
free (ctx->presentation);
|
||||||
|
}
|
||||||
va_destroy_context (ctx->va_ctx);
|
va_destroy_context (ctx->va_ctx);
|
||||||
|
free (ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
vulkan_ctx_t *
|
vulkan_ctx_t *
|
||||||
|
@ -184,6 +188,7 @@ Win_Vulkan_Context (vid_internal_t *vi)
|
||||||
{
|
{
|
||||||
vulkan_ctx_t *ctx = calloc (1, sizeof (vulkan_ctx_t));
|
vulkan_ctx_t *ctx = calloc (1, sizeof (vulkan_ctx_t));
|
||||||
*ctx = (vulkan_ctx_t) {
|
*ctx = (vulkan_ctx_t) {
|
||||||
|
.delete = delete_vulkan_context,
|
||||||
.load_vulkan = load_vulkan_library,
|
.load_vulkan = load_vulkan_library,
|
||||||
.unload_vulkan = unload_vulkan_library,
|
.unload_vulkan = unload_vulkan_library,
|
||||||
.get_presentation_support = win_vulkan_get_presentation_support,
|
.get_presentation_support = win_vulkan_get_presentation_support,
|
||||||
|
|
|
@ -20,4 +20,5 @@ export QCSYSPREFIX=$MINGW_USR
|
||||||
--enable-silent-rules \
|
--enable-silent-rules \
|
||||||
--host=x86_64-w64-mingw32.static \
|
--host=x86_64-w64-mingw32.static \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
|
--disable-lto \
|
||||||
$*
|
$*
|
||||||
|
|
|
@ -576,7 +576,7 @@ run_cpp (const char *filename, const char *ext)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!options.save_temps && !options.preprocess_only)
|
if (!options.save_temps && !options.preprocess_only) {
|
||||||
mktemp (tempname->str);
|
mktemp (tempname->str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue