LLVM bitcode contains support for weak symbols, so we can add support for overriding weak symbols in the output COFF even though COFF doesn't have inherent support for weak symbols. The motivation for this patch is that Chromium is trying to use libc++'s assertion handler mechanism, which relies on weak symbols [0], but we're unable to perform a ThinLTO build on Windows due to this problem [1]. [0]: https://reviews.llvm.org/D121478 [1]: https://crrev.com/c/3863576 Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D133165
7 lines
214 B
LLVM
7 lines
214 B
LLVM
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-pc-windows-msvc"
|
|
|
|
define weak dso_local noundef i32 @foo() local_unnamed_addr {
|
|
ret i32 1234
|
|
}
|