From d62d874dd28f9370724bc8fbc6ba76eb1b01947c Mon Sep 17 00:00:00 2001 From: TechnoPorg Date: Thu, 29 Jul 2021 08:09:14 -0600 Subject: [PATCH] Enable BTLS when building for Windows --- README.md | 2 +- bcl.py | 19 ++++++++++++++----- desktop.py | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0ae2293..027905c 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ export MONO_SOURCE_ROOT=$HOME/git/mono ### Notes - Python 3.7 or higher is required. -- OSXCROSS is supported expect for building the Mono cross-compilers. +- OSXCROSS is supported except for building the Mono cross-compilers. - Building on Windows is not supported. It's possible to use Cygwin or WSL (Windows Subsystem for Linux) but this hasn't been tested. ## Compiling Godot for Desktop with this Runtime diff --git a/bcl.py b/bcl.py index 86672d6..1b74cfd 100755 --- a/bcl.py +++ b/bcl.py @@ -40,7 +40,7 @@ def get_profile_install_dirs(opts: BaseOpts, product: str): profiles = profiles_table[product] return [path_join(install_dir, get_profile_dir(profile, product)) for profile in profiles] -def configure_bcl(opts: BclOpts): +def configure_bcl(opts: BclOpts, product: str): stamp_file = path_join(opts.configure_dir, '.stamp-bcl-configure') if os.path.isfile(stamp_file): @@ -54,12 +54,21 @@ def configure_bcl(opts: BclOpts): CONFIGURE_FLAGS = [ '--disable-boehm', - '--disable-btls-lib', '--disable-nls', '--disable-support-build', '--with-mcs-docs=no' ] + if product == 'desktop-win32': + CONFIGURE_FLAGS += [ + '--enable-btls', + '--enable-btls-lib' + ] + else: + CONFIGURE_FLAGS += [ + '--disable-btls-lib' + ] + configure = path_join(opts.mono_source_root, 'configure') configure_args = CONFIGURE_FLAGS @@ -84,8 +93,8 @@ def make_bcl(opts: BclOpts): touch(stamp_file) -def build_bcl(opts: BclOpts): - configure_bcl(opts) +def build_bcl(opts: BclOpts, product: str): + configure_bcl(opts, product) make_bcl(opts) @@ -97,7 +106,7 @@ def clean_bcl(opts: BclOpts): def make_product(opts: BclOpts, product: str): - build_bcl(opts) + build_bcl(opts, product) build_dir = path_join(opts.configure_dir, 'bcl') diff --git a/desktop.py b/desktop.py index d8de014..ab54122 100755 --- a/desktop.py +++ b/desktop.py @@ -87,7 +87,8 @@ def setup_desktop_template(env: dict, opts: DesktopOpts, product: str, target_pl '--disable-mcs-build', '--enable-maintainer-mode', '--with-tls=pthread', - '--without-ikvm-native' + '--without-ikvm-native', + '--enable-btls' ] if target_platform == 'windows': @@ -98,7 +99,6 @@ def setup_desktop_template(env: dict, opts: DesktopOpts, product: str, target_pl CONFIGURE_FLAGS += [ '--disable-iconv', '--disable-nls', - '--enable-dynamic-btls', '--with-sigaltstack=yes', ]