From c4d5353484d0c7b5925b21f7ffae49bd8f0e2f0b Mon Sep 17 00:00:00 2001 From: rchiodo Date: Wed, 24 Aug 2022 15:27:58 -0700 Subject: [PATCH 1/2] Add new wasm build target and support a pkg_config_path --- .gitignore | 1 + Tools/wasm/wasm_build.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) 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/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: From 64adb004999110e2a169c48554ce382237300a72 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 23:58:07 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Build/2022-08-24-23-58-06.gh-issue-96254.MWDEJz.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Build/2022-08-24-23-58-06.gh-issue-96254.MWDEJz.rst 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