diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-06-11 20:03:02 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-06-11 20:03:03 -0700 |
commit | 870f03672ca3513fe5d666f425942fda651f30ec (patch) | |
tree | edb8492d6181a99db7a38337ee2239c06d97661e /qemu-common.h | |
parent | 32167ca6cd795b619f4327d83f643a0805735ead (diff) | |
parent | 0b3979707c09e058442c22d046b326ce244edda1 (diff) | |
download | external_qemu-870f03672ca3513fe5d666f425942fda651f30ec.zip external_qemu-870f03672ca3513fe5d666f425942fda651f30ec.tar.gz external_qemu-870f03672ca3513fe5d666f425942fda651f30ec.tar.bz2 |
Merge "Force emulator to quit if it's built w/o global register variable support"
Diffstat (limited to 'qemu-common.h')
-rw-r--r-- | qemu-common.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h index 79ac779..097e1fc 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -408,4 +408,20 @@ typedef enum DisplayType #define CLAMP_MAC_TIMEOUT(to) ((void)0) #endif // _DARWIN_C_SOURCE +#if defined(__clang__) || defined(__llvm__) +/* Clang and llvm-gcc don't support global register variable (GRV). + Clang issues compile-time error for GRV. llvm-gcc accepts GRV (because + its front-end is gcc) but ignores it in the llvm-based back-end. + Undefining GRV decl to allow external/qemu and the rest of Android + to compile. But emulator built w/o GRV support will not function + correctly. User will be greeted with an error message (issued + in tcg/tcg.c) when emulator built this way is launched. + */ +#define SUPPORT_GLOBAL_REGISTER_VARIABLE 0 +#define GLOBAL_REGISTER_VARIABLE_DECL +#else +#define SUPPORT_GLOBAL_REGISTER_VARIABLE 1 +#define GLOBAL_REGISTER_VARIABLE_DECL register +#endif /* __clang__ || __llvm__ */ + #endif |