Skip to content

Commit

Permalink
Try #960:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Nov 13, 2019
2 parents 7286493 + 938dedb commit 19db9b8
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 38 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## **[Unreleased]**

- [#960](https://github.com/wasmerio/wasmer/pull/960) Fix `runtime-c-api` header files when compiled by clang.
- [#925](https://github.com/wasmerio/wasmer/pull/925) Host functions can be closures with a captured environment.
- [#917](https://github.com/wasmerio/wasmer/pull/917) Host functions (aka imported functions) may not have `&mut vm::Ctx` as first argument, i.e. the presence of the `&mut vm::Ctx` argument is optional.
- [#915](https://github.com/wasmerio/wasmer/pull/915) All backends share the same definition of `Trampoline` (defined in `wasmer-runtime-core`).
Expand Down
24 changes: 12 additions & 12 deletions lib/runtime-c-api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ fn main() {
out_wasmer_header_file.push("wasmer");

const WASMER_PRE_HEADER: &str = r#"
#ifndef WASMER_H_MACROS
#define WASMER_H_MACROS
#if MSVC
#ifdef _M_AMD64
#define ARCH_X86_64
#endif
#endif
#if !defined(WASMER_H_MACROS)
#define WASMER_H_MACROS
#if defined(MSVC)
#if defined(_M_AMD64)
#define ARCH_X86_64
#endif
#endif
#if GCC
#ifdef __x86_64__
#define ARCH_X86_64
#endif
#if defined(GCC) || defined(__clang__)
#if defined(__x86_64__)
#define ARCH_X86_64
#endif
#endif
#endif
#endif // WASMER_H_MACROS
"#;
// Generate the C bindings in the `OUT_DIR`.
out_wasmer_header_file.set_extension("h");
Expand Down
26 changes: 13 additions & 13 deletions lib/runtime-c-api/wasmer.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

#ifndef WASMER_H_MACROS
#define WASMER_H_MACROS
#if MSVC
#ifdef _M_AMD64
#define ARCH_X86_64
#if !defined(WASMER_H_MACROS)
#define WASMER_H_MACROS
#if defined(MSVC)
#if defined(_M_AMD64)
#define ARCH_X86_64
#endif
#endif

#if defined(GCC) || defined(__clang__)
#if defined(__x86_64__)
#define ARCH_X86_64
#endif
#endif
#endif
#endif

#if GCC
#ifdef __x86_64__
#define ARCH_X86_64
#endif
#endif
#endif // WASMER_H_MACROS


#ifndef WASMER_H
Expand Down
26 changes: 13 additions & 13 deletions lib/runtime-c-api/wasmer.hh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

#ifndef WASMER_H_MACROS
#define WASMER_H_MACROS
#if MSVC
#ifdef _M_AMD64
#define ARCH_X86_64
#if !defined(WASMER_H_MACROS)
#define WASMER_H_MACROS
#if defined(MSVC)
#if defined(_M_AMD64)
#define ARCH_X86_64
#endif
#endif

#if defined(GCC) || defined(__clang__)
#if defined(__x86_64__)
#define ARCH_X86_64
#endif
#endif
#endif
#endif

#if GCC
#ifdef __x86_64__
#define ARCH_X86_64
#endif
#endif
#endif // WASMER_H_MACROS


#ifndef WASMER_H
Expand Down

0 comments on commit 19db9b8

Please sign in to comment.