diff --git a/.gitignore b/.gitignore index 0ddfd717d737f8..5e6416559d237a 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,7 @@ PCbuild/win32/ Tools/unicode/data/ /autom4te.cache /build/ +/builddir/ /config.cache /config.log /config.status diff --git a/Misc/NEWS.d/next/Build/2022-08-24-23-58-06.gh-issue-96254.MWDEJz.rst b/Misc/NEWS.d/next/Build/2022-08-24-23-58-06.gh-issue-96254.MWDEJz.rst new file mode 100644 index 00000000000000..3da2cb4be5d2d6 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-08-24-23-58-06.gh-issue-96254.MWDEJz.rst @@ -0,0 +1 @@ +Add support for a pthread and dynamic link version of the emscripten node build diff --git a/Tools/wasm/wasm_build.py b/Tools/wasm/wasm_build.py index 5ccf88cbc44fd0..77f7d3c694d150 100755 --- a/Tools/wasm/wasm_build.py +++ b/Tools/wasm/wasm_build.py @@ -303,6 +303,7 @@ class BuildProfile: dynamic_linking: Union[bool, None] = None pthreads: Union[bool, None] = None testopts: str = "-j2" + pkg_config_path: Union[str, None] = None @property def can_execute(self) -> bool: @@ -361,6 +362,9 @@ def configure_cmd(self) -> List[str]: if platform.config_site is not None: cmd.append(f"CONFIG_SITE={platform.config_site}") + if self.pkg_config_path is not None: + cmd.append(f"PKG_CONFIG_PATH={self.pkg_config_path}") + return cmd @property @@ -483,6 +487,13 @@ def clean(self, all: bool = False): target=EmscriptenTarget.node, pthreads=True, ), + BuildProfile( + "emscripten-node-pthreads-dl", + host=Host.wasm32_emscripten, + target=EmscriptenTarget.node, + pthreads=True, + dynamic_linking=True + ), BuildProfile( "emscripten-node-pthreads-debug", host=Host.wasm32_emscripten, @@ -541,6 +552,11 @@ def clean(self, all: bool = False): nargs="?", ) +parser.add_argument( + "--pkg-config-path", + help="PKG_CONFIG_PATH value to pass to configure" +) + def main(): args = parser.parse_args() @@ -550,6 +566,7 @@ def main(): parser.exit(0) builder = PROFILES[args.platform] + builder.pkg_config_path = args.pkg_config_path try: builder.host.platform.check() except ConditionError as e: