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

Add support for building AArch64 with Clang #374

Merged
merged 6 commits into from
Jun 2, 2023

Commits on May 4, 2023

  1. [clang] Avoid a nested function in heap_wrapper.c

    This GCC extension is not supported by clang and in this case is not
    necessary. Move the function to the top level to avoid the syntax error.
    arichardson committed May 4, 2023
    Configuration menu
    Copy the full SHA
    b57a56f View commit details
    Browse the repository at this point in the history
  2. [clang][compiler.h] Expose a few more macros for Clang

    Clang sets the defines for GCC 4.2.1, so we have to check __clang__ for
    these macros in addition to the GCC version.
    arichardson committed May 4, 2023
    Configuration menu
    Copy the full SHA
    793175c View commit details
    Browse the repository at this point in the history
  3. [arm64] Allow assembling with clang

    Clang does not accept this .if condition since phys_offset is a register
    alias and not an absolute expression. We can keep these two instructions
    here if the argument is zero since the result will be the same.
    Additionally, this macro is only called once and always passes a non-zero
    argument. If more calls are added in the future and avoiding these two
    instructions just before a loop is really important, we could use
    `.ifnc \phys_offset,0` instead, but that looks rather obscure to me.
    arichardson committed May 4, 2023
    Configuration menu
    Copy the full SHA
    684930e View commit details
    Browse the repository at this point in the history
  4. [make] Fix linker invocation to be compatible with ld.lld

    The LLD linker does not allow joined short arguments, so split -dT <script>
    into -d -T <script>.
    arichardson committed May 4, 2023
    Configuration menu
    Copy the full SHA
    c43761e View commit details
    Browse the repository at this point in the history
  5. [make][clang] Do not add unsupported warning flags

    Currently, clang does not support the -Wno-nonnull-compare and
    -Wmaybe-uninitialized warning flags so this adds lots of unknown warning
    flag output for each compile job when not using GCC.
    This commit adds a makefile macro to check for supported warning flags
    and only adds them if the compiler actually supports them.
    arichardson committed May 4, 2023
    Configuration menu
    Copy the full SHA
    ea6823c View commit details
    Browse the repository at this point in the history
  6. [clang][arm64] Disable -Wasm-operand-widths warning

    Clang incorrectly diagnoses msr operations as need a 64-bit operand even
    if the underlying register is actually 32 bits. Silence this warning.
    There are quite a few occurrences of this warning so I opted to add the
    -Wno-flag instead of wrapping all callsites in
    `#pragma clang diagnostic ignored -Wasm-operand-widths`.
    arichardson committed May 4, 2023
    Configuration menu
    Copy the full SHA
    dcd7131 View commit details
    Browse the repository at this point in the history