Skip to content

Commit

Permalink
Apply clang-format for core/iwasm compilation and libraries (#784)
Browse files Browse the repository at this point in the history
Apply clang-format for core/iwasm/compilation and core/iwasm/libraries files.
Add wasm-c-api empty_imports sample to workflow test.
And enable triggering workflow when core/config.h changes.
  • Loading branch information
wenyongh committed Oct 13, 2021
1 parent dc65d29 commit fb4afc7
Show file tree
Hide file tree
Showing 87 changed files with 9,536 additions and 10,044 deletions.
1 change: 1 addition & 0 deletions .github/workflows/compilation_on_android_ubuntu_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ jobs:
cmake --build . --config Release --parallel 4
./callback
./callback_chain
./empty_imports
./global
./hello
./hostref
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/spec_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
# will be triggered on PR events
pull_request:
paths:
- "core/config.h"
- "core/iwasm/**"
- "core/shared/**"
- "wamr-compiler/**"
- "product-mini/**"
# will be triggered on push events
push:
paths:
- "core/config.h"
- "core/iwasm/**"
- "core/shared/**"
- "wamr-compiler/**"
Expand Down
9 changes: 5 additions & 4 deletions core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef _CONFIG_H_
#define _CONFIG_H_

/* clang-format off */
#if !defined(BUILD_TARGET_X86_64) \
&& !defined(BUILD_TARGET_AMD_64) \
&& !defined(BUILD_TARGET_AARCH64) \
Expand All @@ -21,6 +22,7 @@
&& !defined(BUILD_TARGET_RISCV32_ILP32D) \
&& !defined(BUILD_TARGET_RISCV32_ILP32) \
&& !defined(BUILD_TARGET_ARC)
/* clang-format on */
#if defined(__x86_64__) || defined(__x86_64)
#define BUILD_TARGET_X86_64
#elif defined(__amd64__) || defined(__amd64)
Expand Down Expand Up @@ -54,7 +56,7 @@
#define BH_DEBUG 0
#endif

#define MEM_ALLOCATOR_EMS 0
#define MEM_ALLOCATOR_EMS 0
#define MEM_ALLOCATOR_TLSF 1

/* Default memory allocator */
Expand Down Expand Up @@ -268,8 +270,8 @@
#define APP_THREAD_STACK_SIZE_DEFAULT (6 * 1024)
#define APP_THREAD_STACK_SIZE_MIN (4 * 1024)
#elif defined(PTHREAD_STACK_DEFAULT) && defined(PTHREAD_STACK_MIN)
#define APP_THREAD_STACK_SIZE_DEFAULT PTHREAD_STACK_DEFAULT
#define APP_THREAD_STACK_SIZE_MIN PTHREAD_STACK_MIN
#define APP_THREAD_STACK_SIZE_DEFAULT PTHREAD_STACK_DEFAULT
#define APP_THREAD_STACK_SIZE_MIN PTHREAD_STACK_MIN
#else
#define APP_THREAD_STACK_SIZE_DEFAULT (32 * 1024)
#define APP_THREAD_STACK_SIZE_MIN (24 * 1024)
Expand Down Expand Up @@ -312,4 +314,3 @@
#endif

#endif /* end of _CONFIG_H_ */

Loading

0 comments on commit fb4afc7

Please sign in to comment.