Skip to content

[RFC/DRAFT]: InitializeNativeTarget() instead of InitializeAllTargets() #420

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ target_link_libraries( ${TARGET_NAME}
LLVMX86Info
LLVMX86Disassembler
LLVMAnalysis
LLVMCodeGen
LLVMX86CodeGen
LLVMCore
LLVMipo
LLVMInstCombine
Expand Down Expand Up @@ -371,6 +371,7 @@ install(FILES opencl_clang.h
DESTINATION include/cclang
COMPONENT ${TARGET_NAME})

add_custom_target(deploy DEPENDS install-${TARGET_NAME})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check if the change in this file is needed

#
# Stripped PDB files
#
Expand Down
7 changes: 3 additions & 4 deletions opencl_clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ void CommonClangInitialize() {
// llvm_shutdown before static object are destroyed, so we use atexit to
// satisfy this requirement.
atexit(CommonClangTerminate);
llvm::InitializeAllTargets();
llvm::InitializeAllAsmPrinters();
llvm::InitializeAllAsmParsers();
llvm::InitializeAllTargetMCs();
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
llvm::InitializeNativeTargetAsmParser();
lazyCCInit = false;
}
}
Expand Down