From d4105e658001677929338835eb970e6595e66b3c Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Tue, 28 Feb 2023 11:53:58 -0800 Subject: [PATCH] [6.1.0] Allow .wasm cc executable and dynamic library extension (#17440) * Add .wasm cc artifact executable extension This allows creating a custom cc_toolchain that compiles to WebAssembly that outputs a wasm file with the standard extension, without needing to have a genrule that renames the file Closes #16091. PiperOrigin-RevId: 503921110 Change-Id: I3ed9e50a945d2e415e2ab34bd99ceea481c987f0 * Add .wasm cc dynamic library extension Similar to #16091 except also allow the `.wasm` extension for dynamic libraries. Closes #17374. PiperOrigin-RevId: 507668339 Change-Id: Id85f98bb804e573e5f93a922b67baf75a22baf16 --------- Co-authored-by: Scott Bennett Co-authored-by: kshyanashree <109167932+kshyanashree@users.noreply.github.com> --- .../google/devtools/build/lib/rules/cpp/ArtifactCategory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/ArtifactCategory.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/ArtifactCategory.java index 1a2416c7875545..e726c63b59e5bd 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/ArtifactCategory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/ArtifactCategory.java @@ -22,8 +22,8 @@ public enum ArtifactCategory { STATIC_LIBRARY("lib", ".a", ".lib"), ALWAYSLINK_STATIC_LIBRARY("lib", ".lo", ".lo.lib"), - DYNAMIC_LIBRARY("lib", ".so", ".dylib", ".dll"), - EXECUTABLE("", "", ".exe"), + DYNAMIC_LIBRARY("lib", ".so", ".dylib", ".dll", ".wasm"), + EXECUTABLE("", "", ".exe", ".wasm"), INTERFACE_LIBRARY("lib", ".ifso", ".tbd", ".if.lib", ".lib"), PIC_FILE("", ".pic"), INCLUDED_FILE_LIST("", ".d"),