Merge pull request #47 from TechnoPorg/windows-enable-btls

Enable BTLS when building for Windows
This commit is contained in:
Ignacio Roldán Etcheverry 2021-07-29 23:37:24 +02:00 committed by GitHub
commit c6bdc0feca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 8 deletions

View File

@ -36,7 +36,7 @@ export MONO_SOURCE_ROOT=$HOME/git/mono
### Notes ### Notes
- Python 3.7 or higher is required. - 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. - 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 ## Compiling Godot for Desktop with this Runtime

19
bcl.py
View File

@ -40,7 +40,7 @@ def get_profile_install_dirs(opts: BaseOpts, product: str):
profiles = profiles_table[product] profiles = profiles_table[product]
return [path_join(install_dir, get_profile_dir(profile, product)) for profile in profiles] 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') stamp_file = path_join(opts.configure_dir, '.stamp-bcl-configure')
if os.path.isfile(stamp_file): if os.path.isfile(stamp_file):
@ -54,12 +54,21 @@ def configure_bcl(opts: BclOpts):
CONFIGURE_FLAGS = [ CONFIGURE_FLAGS = [
'--disable-boehm', '--disable-boehm',
'--disable-btls-lib',
'--disable-nls', '--disable-nls',
'--disable-support-build', '--disable-support-build',
'--with-mcs-docs=no' '--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 = path_join(opts.mono_source_root, 'configure')
configure_args = CONFIGURE_FLAGS configure_args = CONFIGURE_FLAGS
@ -84,8 +93,8 @@ def make_bcl(opts: BclOpts):
touch(stamp_file) touch(stamp_file)
def build_bcl(opts: BclOpts): def build_bcl(opts: BclOpts, product: str):
configure_bcl(opts) configure_bcl(opts, product)
make_bcl(opts) make_bcl(opts)
@ -97,7 +106,7 @@ def clean_bcl(opts: BclOpts):
def make_product(opts: BclOpts, product: str): def make_product(opts: BclOpts, product: str):
build_bcl(opts) build_bcl(opts, product)
build_dir = path_join(opts.configure_dir, 'bcl') build_dir = path_join(opts.configure_dir, 'bcl')

View File

@ -87,7 +87,8 @@ def setup_desktop_template(env: dict, opts: DesktopOpts, product: str, target_pl
'--disable-mcs-build', '--disable-mcs-build',
'--enable-maintainer-mode', '--enable-maintainer-mode',
'--with-tls=pthread', '--with-tls=pthread',
'--without-ikvm-native' '--without-ikvm-native',
'--enable-btls'
] ]
if target_platform == 'windows': if target_platform == 'windows':
@ -98,7 +99,6 @@ def setup_desktop_template(env: dict, opts: DesktopOpts, product: str, target_pl
CONFIGURE_FLAGS += [ CONFIGURE_FLAGS += [
'--disable-iconv', '--disable-iconv',
'--disable-nls', '--disable-nls',
'--enable-dynamic-btls',
'--with-sigaltstack=yes', '--with-sigaltstack=yes',
] ]