diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/Makefile.rules | 2 | ||||
-rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 1 | ||||
-rw-r--r-- | llvm/include/llvm/Support/DataTypes.h.cmake | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index 4d30d45b676..d057f043ff6 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -623,7 +623,7 @@ CPP.BaseFlags += -include llvm/Support/Solaris.h endif # !HOST_OS - AuroraUX. LD.Flags += -L$(LibDir) -L$(LLVMLibDir) -CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS +CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS # All -I flags should go here, so that they don't confuse llvm-config. CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \ $(patsubst %,-I%/include,\ diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 908bf6cce9c..9dc1624f446 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -187,6 +187,7 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) endif( MSVC ) add_llvm_definitions( -D__STDC_CONSTANT_MACROS ) +add_llvm_definitions( -D__STDC_FORMAT_MACROS ) add_llvm_definitions( -D__STDC_LIMIT_MACROS ) option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) diff --git a/llvm/include/llvm/Support/DataTypes.h.cmake b/llvm/include/llvm/Support/DataTypes.h.cmake index 260ed9bb5c4..23d87fbb891 100644 --- a/llvm/include/llvm/Support/DataTypes.h.cmake +++ b/llvm/include/llvm/Support/DataTypes.h.cmake @@ -164,6 +164,11 @@ typedef signed int ssize_t; #ifndef UINT64_C # define UINT64_C(C) C##ui64 #endif + +#ifndef PRIx64 +# define PRIx64 "I64x" +#endif + #endif /* _MSC_VER */ /* Set defaults for constants which we cannot find. */ |