aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-c-test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-c-test')
-rw-r--r--tools/llvm-c-test/CMakeLists.txt11
-rw-r--r--tools/llvm-c-test/object.c5
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/llvm-c-test/CMakeLists.txt b/tools/llvm-c-test/CMakeLists.txt
index 2926d9dd3455..34fea3d69c16 100644
--- a/tools/llvm-c-test/CMakeLists.txt
+++ b/tools/llvm-c-test/CMakeLists.txt
@@ -1,7 +1,14 @@
-set(LLVM_LINK_COMPONENTS all)
+set(LLVM_LINK_COMPONENTS
+ ${LLVM_TARGETS_TO_BUILD}
+ BitReader
+ Core
+ MCDisassembler
+ Object
+ Target
+ )
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wstrict-prototypes")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wstrict-prototypes")
endif ()
add_llvm_tool(llvm-c-test
diff --git a/tools/llvm-c-test/object.c b/tools/llvm-c-test/object.c
index 279292865420..a5421d9066d5 100644
--- a/tools/llvm-c-test/object.c
+++ b/tools/llvm-c-test/object.c
@@ -72,9 +72,8 @@ int object_list_symbols(void) {
while (!LLVMIsSymbolIteratorAtEnd(O, sym)) {
LLVMMoveToContainingSection(sect, sym);
- printf("%s @0x%08" PRIx64 "/0x%08" PRIx64 " +%" PRIu64 " (%s)\n",
- LLVMGetSymbolName(sym), LLVMGetSymbolAddress(sym),
- LLVMGetSymbolFileOffset(sym), LLVMGetSymbolSize(sym),
+ printf("%s @0x%08" PRIx64 " +%" PRIu64 " (%s)\n", LLVMGetSymbolName(sym),
+ LLVMGetSymbolAddress(sym), LLVMGetSymbolSize(sym),
LLVMGetSectionName(sect));
LLVMMoveToNextSymbol(sym);