Skip to content

Commit

Permalink
Don’t hardcode the x86 target
Browse files Browse the repository at this point in the history
  • Loading branch information
taahol committed Feb 23, 2024
1 parent c3c2efa commit 1c97be8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ static void cleanup(void)

void init_target(void)
{
LLVMInitializeX86TargetInfo();
LLVMInitializeX86Target();
LLVMInitializeX86TargetMC();
LLVMInitializeX86AsmParser();
LLVMInitializeX86AsmPrinter();
LLVMInitializeAllTargetInfos();
LLVMInitializeAllTargets();
LLVMInitializeAllTargetMCs();
LLVMInitializeAllAsmParsers();
LLVMInitializeAllAsmPrinters();

#ifdef _WIN32
// Default is x86_64-pc-windows-msvc
Expand All @@ -37,7 +37,7 @@ void init_target(void)
assert(target.target_ref);

target.target_machine_ref = LLVMCreateTargetMachine(
target.target_ref, target.triple, "x86-64", "", LLVMCodeGenLevelDefault, LLVMRelocPIC, LLVMCodeModelDefault);
target.target_ref, target.triple, "", "", LLVMCodeGenLevelDefault, LLVMRelocPIC, LLVMCodeModelDefault);
assert(target.target_machine_ref);

target.target_data_ref = LLVMCreateTargetDataLayout(target.target_machine_ref);
Expand Down

0 comments on commit 1c97be8

Please sign in to comment.