Skip to content

Commit

Permalink
[BOLT] Fix runtime osx cross-compile build
Browse files Browse the repository at this point in the history
Place include elf.h under !apple condition

Differential Revision: https://reviews.llvm.org/D119038
  • Loading branch information
yota9 committed Feb 8, 2022
1 parent 1266632 commit 823ebcc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bolt/runtime/common.h
Expand Up @@ -11,6 +11,12 @@
#include <cstddef>
#include <cstdint>

#include "config.h"

#ifdef HAVE_ELF_H
#include <elf.h>
#endif

#else

typedef __SIZE_TYPE__ size_t;
Expand All @@ -32,12 +38,6 @@ typedef int int32_t;

#endif

#include "config.h"

#ifdef HAVE_ELF_H
#include <elf.h>
#endif

// Save all registers while keeping 16B stack alignment
#define SAVE_ALL \
"push %%rax\n" \
Expand Down

0 comments on commit 823ebcc

Please sign in to comment.