Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF][RISCV] Support RISC-V in getBitcodeMachineKind
Add Triple::riscv64 and Triple::riscv32 to getBitcodeMachineKind for get right e_machine during LTO. Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D52165 llvm-svn: 364996
- Loading branch information
1 parent
80177ca
commit eb9bc38
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
; REQUIRES: riscv | ||
|
||
; RUN: llvm-as %s -o %t.o | ||
; RUN: ld.lld %t.o -o %t | ||
target datalayout = "e-m:e-p:32:32-i64:64-n32-S128" | ||
target triple = "riscv32-unknown-elf" | ||
|
||
define void @f() { | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
; REQUIRES: riscv | ||
|
||
; RUN: llvm-as %s -o %t.o | ||
; RUN: ld.lld %t.o -o %t | ||
target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128" | ||
target triple = "riscv64-unknown-elf" | ||
|
||
define void @f() { | ||
ret void | ||
} |