Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-libtool-darwin] Fix crash with bitcode asm module
When using llvm-libtool-darwin with LTO building llvm itself, it crashed on a file with an asm module in the bitcode. This fixes that by correctly registering the targets for this. Differential Revision: https://reviews.llvm.org/D118575
- Loading branch information
Showing
6 changed files
with
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
target triple = "arm64-apple-macosx11.0.0" | ||
|
||
module asm ".desc ___crashreporter_info__, 0x10" | ||
|
||
define void @somesymbol() { | ||
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,7 @@ | ||
target triple = "x86_64-apple-macosx11.0.0" | ||
|
||
module asm ".desc ___crashreporter_info__, 0x10" | ||
|
||
define void @somesymbol() { | ||
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,9 @@ | ||
# REQUIRES: aarch64-registered-target | ||
## This tests that archives are correctly created when the llvm | ||
## has native assembly info | ||
|
||
# RUN: llvm-as %p/Inputs/arm64-asm.ll -o %t-arm64-asm.bc | ||
# RUN: llvm-libtool-darwin -static -o %t-arm64.lib %t-arm64-asm.bc | ||
# RUN: llvm-nm %t-arm64.lib | FileCheck %s | ||
|
||
# CHECK: T somesymbol |
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,9 @@ | ||
# REQUIRES: x86-registered-target | ||
## This tests that archives are correctly created when the llvm | ||
## has native assembly info | ||
|
||
# RUN: llvm-as %p/Inputs/x86_64-asm.ll -o %t-x86_64-asm.bc | ||
# RUN: llvm-libtool-darwin -static -o %t-x86_64.lib %t-x86_64-asm.bc | ||
# RUN: llvm-nm %t-x86_64.lib | FileCheck %s | ||
|
||
# CHECK: T somesymbol |
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