diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-23 13:45:05 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-05-05 21:14:54 +0200 |
commit | 8a4173987edfeeb7e49c70617d43e3adc911d333 (patch) | |
tree | 24360e0c3fe2b2138f9a291f143f9a6667c53510 /autogen.sh | |
parent | 013ddc4f5307df512767ca23b3922540b2b36d52 (diff) |
WASM: add initial support for Emscripten cross build
- configure with:
- --host=wasm64-local-emscripten
- had to make a few externals optional, so adding:
- --disable-nss
- --disable-cmis
- --disable-curl
Change-Id: I48d1c73d2675ad2e2beaf2c341578199efbd24ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111130
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh index 1779de77e6f3..bef1f7faf561 100755 --- a/autogen.sh +++ b/autogen.sh @@ -295,15 +295,21 @@ if (defined $ENV{NOCONFIGURE}) { push @args, "--srcdir=$src_path"; push @args, "--enable-option-checking=$option_checking"; - print "Running ./configure with '" . join (" ", @args), "'\n"; - # When running a shell script from Perl on WSL, weirdly named # environment variables like the "ProgramFiles(x86)" one don't get # imported by the shell. So export it as PROGRAMFILESX86 instead. my $building_for_linux = 0; + my $building_with_emscripten = 0; foreach my $arg (@args) { $building_for_linux = 1 if ($arg =~ /--host=x86_64.*linux/); + $building_with_emscripten = 1 if ($arg =~ /^--host=wasm.*-emscripten$/); } + + unshift @args, "./configure"; + unshift @args, "emconfigure" if ($building_with_emscripten); + + print "Running '" . join (" ", @args), "'\n"; + if (`wslsys 2>/dev/null` ne "" && !$building_for_linux) { if (!$ENV{"ProgramFiles(x86)"}) { print STDERR "To build for Windows on WSL, you need to set the WSLENV environment variable in the Control Panel to 'ProgramFiles(x86)'\n"; @@ -313,7 +319,7 @@ if (defined $ENV{NOCONFIGURE}) { $ENV{"PROGRAMFILESX86"} = $ENV{"ProgramFiles(x86)"}; } - system ("./configure", @args) && die "Error running configure"; + system (@args) && die "Error running configure"; } # Local Variables: |