[libunwind] [libunwind] Add Unwind-wasm.c to CMakeLists.txt (PR #67770)

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 28 23:47:05 PDT 2023


https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/67770

This was missing when the file was added.

>From 3277e2c8058c5d9b0afcc073d711646ebbf7ed62 Mon Sep 17 00:00:00 2001
From: Heejin Ahn <aheejin at gmail.com>
Date: Thu, 28 Sep 2023 23:43:26 -0700
Subject: [PATCH] [libunwind] Add Unwind-wasm.c to CMakeLists.txt

This was missing when the file was added.
---
 libunwind/src/CMakeLists.txt | 1 +
 libunwind/src/Unwind-wasm.c  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 452d988c3726b5e..abb019b88ebabd7 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -16,6 +16,7 @@ set(LIBUNWIND_C_SOURCES
     UnwindLevel1.c
     UnwindLevel1-gcc-ext.c
     Unwind-sjlj.c
+    Unwind-wasm.c
     )
 set_source_files_properties(${LIBUNWIND_C_SOURCES}
                             PROPERTIES
diff --git a/libunwind/src/Unwind-wasm.c b/libunwind/src/Unwind-wasm.c
index 35f2f9aeab08048..47c79b0d14d37b7 100644
--- a/libunwind/src/Unwind-wasm.c
+++ b/libunwind/src/Unwind-wasm.c
@@ -10,12 +10,13 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifdef __USING_WASM_EXCEPTIONS__
+
 #include "config.h"
 #include "unwind.h"
 #include <stdbool.h>
 #include <threads.h>
 
-#ifdef __USING_WASM_EXCEPTIONS__
 
 _Unwind_Reason_Code __gxx_personality_wasm0(int version, _Unwind_Action actions,
                                             uint64_t exceptionClass,



More information about the cfe-commits mailing list