Skip to content

Commit e9c8179

Browse files
vchuravygiordano
authored andcommitted
[LLVM] add 12.0.1
1 parent cebe7ef commit e9c8179

24 files changed

+1672
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version = v"12.0.1"
2+
3+
include("../common.jl")
4+
5+
build_tarballs(ARGS, configure_build(ARGS, version; experimental_platforms=true)...;
6+
preferred_gcc_version=v"7", preferred_llvm_version=v"9", julia_compat="1.7")
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/include/locale b/include/locale
2+
index 2043892fa2d..4af51464208 100644
3+
--- a/include/locale
4+
+++ b/include/locale
5+
@@ -737,7 +737,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
6+
typename remove_reference<decltype(errno)>::type __save_errno = errno;
7+
errno = 0;
8+
char *__p2;
9+
- long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
10+
+ long long __ll = strtoll(__a, &__p2, __base);
11+
typename remove_reference<decltype(errno)>::type __current_errno = errno;
12+
if (__current_errno == 0)
13+
errno = __save_errno;
14+
@@ -777,7 +777,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
15+
typename remove_reference<decltype(errno)>::type __save_errno = errno;
16+
errno = 0;
17+
char *__p2;
18+
- unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
19+
+ unsigned long long __ll = strtoull(__a, &__p2, __base);
20+
typename remove_reference<decltype(errno)>::type __current_errno = errno;
21+
if (__current_errno == 0)
22+
errno = __save_errno;
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
From 4370214628487ac8495f963ae05960b5ecc31103 Mon Sep 17 00:00:00 2001
2+
From: Jameson Nash <[email protected]>
3+
Date: Thu, 12 Sep 2019 11:45:07 -0400
4+
Subject: [PATCH] Revert "[MC] Always emit relocations for same-section
5+
function references"
6+
7+
This reverts commit 9232972575cafac29c3e4817c8714c9aca0e8585.
8+
---
9+
lib/MC/WinCOFFObjectWriter.cpp | 12 +++++-------
10+
test/MC/COFF/diff.s | 25 ++++++++-----------------
11+
2 files changed, 13 insertions(+), 24 deletions(-)
12+
13+
diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp
14+
index 9ffecd99df6..0214161e03c 100644
15+
--- a/lib/MC/WinCOFFObjectWriter.cpp
16+
+++ b/lib/MC/WinCOFFObjectWriter.cpp
17+
@@ -690,14 +690,12 @@ void WinCOFFObjectWriter::executePostLayoutBinding(MCAssembler &Asm,
18+
bool WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
19+
const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB,
20+
bool InSet, bool IsPCRel) const {
21+
- // Don't drop relocations between functions, even if they are in the same text
22+
- // section. Multiple Visual C++ linker features depend on having the
23+
- // relocations present. The /INCREMENTAL flag will cause these relocations to
24+
- // point to thunks, and the /GUARD:CF flag assumes that it can use relocations
25+
- // to approximate the set of all address taken functions. LLD's implementation
26+
- // of /GUARD:CF also relies on the existance of these relocations.
27+
+ // MS LINK expects to be able to replace all references to a function with a
28+
+ // thunk to implement their /INCREMENTAL feature. Make sure we don't optimize
29+
+ // away any relocations to functions.
30+
uint16_t Type = cast<MCSymbolCOFF>(SymA).getType();
31+
- if ((Type >> COFF::SCT_COMPLEX_TYPE_SHIFT) == COFF::IMAGE_SYM_DTYPE_FUNCTION)
32+
+ if (Asm.isIncrementalLinkerCompatible() &&
33+
+ (Type >> COFF::SCT_COMPLEX_TYPE_SHIFT) == COFF::IMAGE_SYM_DTYPE_FUNCTION)
34+
return false;
35+
return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,
36+
InSet, IsPCRel);
37+
diff --git a/test/MC/COFF/diff.s b/test/MC/COFF/diff.s
38+
index f89e4ed8901..d68e628577b 100644
39+
--- a/test/MC/COFF/diff.s
40+
+++ b/test/MC/COFF/diff.s
41+
@@ -1,14 +1,19 @@
42+
// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | llvm-readobj -s -sr -sd | FileCheck %s
43+
44+
-// COFF resolves differences between labels in the same section, unless that
45+
-// label is declared with function type.
46+
-
47+
.section baz, "xr"
48+
+ .def X
49+
+ .scl 2;
50+
+ .type 32;
51+
+ .endef
52+
.globl X
53+
X:
54+
mov Y-X+42, %eax
55+
retl
56+
57+
+ .def Y
58+
+ .scl 2;
59+
+ .type 32;
60+
+ .endef
61+
.globl Y
62+
Y:
63+
retl
64+
@@ -25,11 +30,6 @@ _foobar: # @foobar
65+
# %bb.0:
66+
ret
67+
68+
- .globl _baz
69+
-_baz:
70+
- calll _foobar
71+
- retl
72+
-
73+
.data
74+
.globl _rust_crate # @rust_crate
75+
.align 4
76+
@@ -39,15 +39,6 @@ _rust_crate:
77+
.long _foobar-_rust_crate
78+
.long _foobar-_rust_crate
79+
80+
-// Even though _baz and _foobar are in the same .text section, we keep the
81+
-// relocation for compatibility with the VC linker's /guard:cf and /incremental
82+
-// flags, even on mingw.
83+
-
84+
-// CHECK: Name: .text
85+
-// CHECK: Relocations [
86+
-// CHECK-NEXT: 0x12 IMAGE_REL_I386_REL32 _foobar
87+
-// CHECK-NEXT: ]
88+
-
89+
// CHECK: Name: .data
90+
// CHECK: Relocations [
91+
// CHECK-NEXT: 0x4 IMAGE_REL_I386_DIR32 _foobar
92+
--
93+
2.17.1
94+

0 commit comments

Comments
 (0)