Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(runtime-c-api) Add support for clang in WASMER_H_MACROS #960

Merged

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Nov 13, 2019

In #952, the WASMER_H_MACROS constant has been defined. The ARCH_X86_64 constant is defined under 2 conditions: If the compiler is MSVC + _M_AMD64 is defined, or if the compiler is GCC + __x86_64__ is defined.

Clang is missing. And it breaks some projects (like https://github.com/wasmerio/php-ext-wasm or https://github.com/wasmerio/go-ext-wasm for instance).

This patch supports Clang.

@Hywan Hywan added bug Something isn't working 📦 lib-c-api About wasmer-c-api labels Nov 13, 2019
@Hywan Hywan requested a review from bjfish as a code owner November 13, 2019 14:34
#ifdef __x86_64__
#define ARCH_X86_64
#endif
#if defined(GCC) || defined(__clang__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug fix is here: defined(__clang__).

Hywan added a commit to wasmerio/wasmer-php that referenced this pull request Nov 13, 2019
This patch updates the shared libraries to Wasmer 0.10.1.

The `wasmer.hh` file includes this bug fix,
wasmerio/wasmer#960.
@Hywan
Copy link
Contributor Author

Hywan commented Nov 13, 2019

bors try

bors bot added a commit that referenced this pull request Nov 13, 2019
@bors
Copy link
Contributor

bors bot commented Nov 13, 2019

try

Build succeeded

  • wasmerio.wasmer

@MarkMcCaskey
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Nov 14, 2019
960: feat(runtime-c-api) Add support for clang in `WASMER_H_MACROS` r=MarkMcCaskey a=Hywan

In #952, the `WASMER_H_MACROS` constant has been defined. The `ARCH_X86_64` constant is defined under 2 conditions: If the compiler is MSVC + `_M_AMD64` is defined, or if the compiler is GCC + `__x86_64__` is defined.

Clang is missing. And it breaks some projects (like https://github.com/wasmerio/php-ext-wasm or https://github.com/wasmerio/go-ext-wasm for instance).

This patch supports Clang.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
@bors
Copy link
Contributor

bors bot commented Nov 14, 2019

Build succeeded

  • wasmerio.wasmer

@bors bors bot merged commit 074a8f9 into wasmerio:master Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-c-api About wasmer-c-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants