diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/linuxbsd/os_linuxbsd.cpp | 2 | ||||
-rw-r--r-- | platform/linuxbsd/os_linuxbsd.h | 6 | ||||
-rw-r--r-- | platform/windows/detect.py | 11 |
3 files changed, 13 insertions, 6 deletions
diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp index 25cb575199..d5a75edeea 100644 --- a/platform/linuxbsd/os_linuxbsd.cpp +++ b/platform/linuxbsd/os_linuxbsd.cpp @@ -616,6 +616,7 @@ Vector<String> OS_LinuxBSD::get_system_fonts() const { #endif } +#ifdef FONTCONFIG_ENABLED int OS_LinuxBSD::_weight_to_fc(int p_weight) const { if (p_weight < 150) { return FC_WEIGHT_THIN; @@ -665,6 +666,7 @@ int OS_LinuxBSD::_stretch_to_fc(int p_stretch) const { return FC_WIDTH_ULTRAEXPANDED; } } +#endif // FONTCONFIG_ENABLED Vector<String> OS_LinuxBSD::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const { #ifdef FONTCONFIG_ENABLED diff --git a/platform/linuxbsd/os_linuxbsd.h b/platform/linuxbsd/os_linuxbsd.h index ef830a069b..bf469af568 100644 --- a/platform/linuxbsd/os_linuxbsd.h +++ b/platform/linuxbsd/os_linuxbsd.h @@ -51,6 +51,9 @@ class OS_LinuxBSD : public OS_Unix { bool font_config_initialized = false; FcConfig *config = nullptr; FcObjectSet *object_set = nullptr; + + int _weight_to_fc(int p_weight) const; + int _stretch_to_fc(int p_stretch) const; #endif #ifdef JOYDEV_ENABLED @@ -73,9 +76,6 @@ class OS_LinuxBSD : public OS_Unix { MainLoop *main_loop = nullptr; - int _weight_to_fc(int p_weight) const; - int _stretch_to_fc(int p_stretch) const; - String get_systemd_os_release_info_value(const String &key) const; Vector<String> lspci_device_filter(Vector<String> vendor_device_id_mapping, String class_suffix, String check_column, String whitelist) const; diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 705e83dace..1b55574b19 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -188,6 +188,7 @@ def get_opts(): BoolVariable("use_llvm", "Use the LLVM compiler", False), BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True), BoolVariable("use_asan", "Use address sanitizer (ASAN)", False), + BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False), ] @@ -339,10 +340,14 @@ def configure_msvc(env, vcvars_msvc_config): ## Compile/link flags - if env["use_static_cpp"]: - env.AppendUnique(CCFLAGS=["/MT"]) + if env["debug_crt"]: + # Always use dynamic runtime, static debug CRT breaks thread_local. + env.AppendUnique(CCFLAGS=["/MDd"]) else: - env.AppendUnique(CCFLAGS=["/MD"]) + if env["use_static_cpp"]: + env.AppendUnique(CCFLAGS=["/MT"]) + else: + env.AppendUnique(CCFLAGS=["/MD"]) if env["arch"] == "x86_32": env["x86_libtheora_opt_vc"] = True |