Skip to content

Commit edd628c

Browse files
committed
rust: drop unnecessary data layout targets
Since Rust 1.3.0 (rust-lang/rust@958d563) it has been unnecessary to provide the data layout in targets. Additionally the data layouts in this repo created LLVM IR on x86_64 that was differing from other x86_64 builds of Rust. Signed-off-by: Doug Goldstein <[email protected]>
1 parent b9a5ea1 commit edd628c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

recipes-devtools/rust/rust.inc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,36 +93,32 @@ def llvm_features_from_tune(d):
9393
return ','.join(f)
9494

9595
## arm-unknown-linux-gnueabihf
96-
DATA_LAYOUT[arm] = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32"
9796
LLVM_TARGET[arm] = "${RUST_TARGET_SYS}"
9897
TARGET_ENDIAN[arm] = "little"
9998
TARGET_POINTER_WIDTH[arm] = "32"
10099
FEATURES[arm] = "+v6,+vfp2"
101100
PRE_LINK_ARGS[arm] = "-Wl,--as-needed"
102101
POST_LINK_ARGS[arm] = "-lssp"
103102

104-
DATA_LAYOUT[aarch64] = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-n32:64-S128"
103+
## aarch64-unknown-linux-gnu
105104
LLVM_TARGET[aarch64] = "aarch64-unknown-linux-gnu"
106105
TARGET_ENDIAN[aarch64] = "little"
107106
TARGET_POINTER_WIDTH[aarch64] = "64"
108107
PRE_LINK_ARGS[aarch64] = "-Wl,--as-needed"
109108

110109
## x86_64-unknown-linux-gnu
111-
DATA_LAYOUT[x86_64] = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
112110
LLVM_TARGET[x86_64] = "x86_64-unknown-linux-gnu"
113111
TARGET_ENDIAN[x86_64] = "little"
114112
TARGET_POINTER_WIDTH[x86_64] = "64"
115113
PRE_LINK_ARGS[x86_64] = "-Wl,--as-needed -m64"
116114

117115
## i686-unknown-linux-gnu
118-
DATA_LAYOUT[i686] = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
119116
LLVM_TARGET[i686] = "i686-unknown-linux-gnu"
120117
TARGET_ENDIAN[i686] = "little"
121118
TARGET_POINTER_WIDTH[i686] = "32"
122119
PRE_LINK_ARGS[i686] = "-Wl,--as-needed -m32"
123120

124121
## XXX: a bit of a hack so qemux86 builds, clone of i686-unknown-linux-gnu above
125-
DATA_LAYOUT[i586] = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32"
126122
LLVM_TARGET[i586] = "i586-unknown-linux-gnu"
127123
TARGET_ENDIAN[i586] = "little"
128124
TARGET_POINTER_WIDTH[i586] = "32"
@@ -214,9 +210,6 @@ def rust_gen_target(d, thing, wd):
214210
prefix = prefix_for(d, thing)
215211
o = open(wd + sys + '.json', 'w')
216212

217-
data_layout = d.getVarFlag('DATA_LAYOUT', arch, True)
218-
if not data_layout:
219-
bb.utils.fatal("DATA_LAYOUT[{}] required but not set for {}".format(arch, thing))
220213
llvm_target = d.getVarFlag('LLVM_TARGET', arch, True)
221214
target_pointer_width = d.getVarFlag('TARGET_POINTER_WIDTH', arch, True)
222215
endian = d.getVarFlag('TARGET_ENDIAN', arch, True)
@@ -234,7 +227,6 @@ def rust_gen_target(d, thing, wd):
234227
post_link_args = post_link_args_for(d, thing, arch)
235228

236229
o.write('''{{
237-
"data-layout": "{}",
238230
"llvm-target": "{}",
239231
"target-endian": "{}",
240232
"target-word-size": "{}",
@@ -253,7 +245,6 @@ def rust_gen_target(d, thing, wd):
253245
"pre-link-args": {},
254246
"post-link-args": {}
255247
}}'''.format(
256-
data_layout,
257248
llvm_target,
258249
endian,
259250
target_pointer_width,

0 commit comments

Comments
 (0)