[llvm] [llvm-debuginfo-analyzer] Add support for WebAssembly binary format. (PR #82588)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 05:56:09 PDT 2024


================
@@ -0,0 +1,28 @@
+Notes:
+------
+As we should avoid committing binaries (.wasm) to be used in tests,
+instead we provide the '.cpp' source files and the '.s' files.
+
+- For the tests, only the '.s' files are required.
+- We use the target 'wasm32' as the 'wasm64' is not standardized yet.
+
+How to generate .s from .cpp
+----------------------------
+Use clang to generate the '.s'.
+
+  clang --target=wasm32 -S -g Inputs/hello-world.cpp -o Inputs/hello-world-clang.s
+  clang --target=wasm32 -S -g Inputs/pr-43860.cpp    -o Inputs/pr-43860-clang.s
+  clang --target=wasm32 -S -g Inputs/pr-44884.cpp    -o Inputs/pr-44884-clang.s
+  clang --target=wasm32 -S -g Inputs/pr-46466.cpp    -o Inputs/pr-46466-clang.s
+  clang --target=wasm32 -S -g Inputs/test.cpp        -o Inputs/test-clang.s
+
+How to generate .wasm from .s
----------------
CarlosAlbertoEnciso wrote:

Good point. Changing `.wasm` to `.o`.

https://github.com/llvm/llvm-project/pull/82588


More information about the llvm-commits mailing list