]> git.lizzy.rs Git - rust.git/commitdiff
Change target-word-size to target-pointer-width
authorSimonas Kazlauskas <git@kazlauskas.me>
Wed, 11 Feb 2015 19:53:31 +0000 (21:53 +0200)
committerSimonas Kazlauskas <git@kazlauskas.me>
Wed, 11 Feb 2015 20:29:16 +0000 (22:29 +0200)
This aligns json target specification to match terminology used elsewhere in the code base.

[breaking-change] for custom target json users. Change all appearances of target-word-size
to target-pointer-width.

src/librustc/session/config.rs
src/librustc_back/target/mod.rs
src/test/run-make/target-specs/my-awesome-platform.json
src/test/run-make/target-specs/my-incomplete-platform.json
src/test/run-make/target-specs/x86_64-unknown-linux-gnu.json

index 949fee45517e2840375c14ab2c06d6ee31328f65..93fd4b88805a285ae7e50510eaecef943fa4b7eb 100644 (file)
@@ -645,7 +645,7 @@ pub fn build_target_config(opts: &Options, sp: &SpanHandler) -> Config {
         "32" => (ast::TyI32, ast::TyU32),
         "64" => (ast::TyI64, ast::TyU64),
         w    => sp.handler().fatal(&format!("target specification was invalid: unrecognized \
-                                            target-word-size {}", w)[])
+                                             target-pointer-width {}", w)[])
     };
 
     Config {
index afb5c948f188542b20cb63c72c03b15d38d9be0e..8d352fdcd5758fe60e0547cb05cf9b97ffe261f8 100644 (file)
@@ -40,7 +40,7 @@
 //! this module defines the format the JSON file should take, though each
 //! underscore in the field names should be replaced with a hyphen (`-`) in the
 //! JSON file. Some fields are required in every target specification, such as
-//! `data-layout`, `llvm-target`, `target-endian`, `target-word-size`, and
+//! `data-layout`, `llvm-target`, `target-endian`, `target-pointer-width`, and
 //! `arch`. In general, options passed to rustc with `-C` override the target's
 //! settings, though `target-feature` and `link-args` will *add* to the list
 //! specified by the target, rather than replace.
@@ -241,7 +241,7 @@ pub fn from_json(obj: Json) -> Target {
             data_layout: get_req_field("data-layout"),
             llvm_target: get_req_field("llvm-target"),
             target_endian: get_req_field("target-endian"),
-            target_pointer_width: get_req_field("target-word-size"),
+            target_pointer_width: get_req_field("target-pointer-width"),
             arch: get_req_field("arch"),
             target_os: get_req_field("os"),
             options: Default::default(),
index f5f622bbcdaa69cb697aad58ac154d4465a1eb61..d7cf7131d73813870609332b89e25813e1b08842 100644 (file)
@@ -2,7 +2,7 @@
     "data-layout": "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32",
     "llvm-target": "i686-unknown-linux-gnu",
     "target-endian": "little",
-    "target-word-size": "32",
+    "target-pointer-width": "32",
     "arch": "x86",
     "os": "linux",
     "morestack": false
index 5005a9ff83960cd1485aa17a1ccefb80c00d35c0..053f2dd63358a9b9e832e5dbaaf7831e5752b445 100644 (file)
@@ -1,7 +1,7 @@
 {
     "data-layout": "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32",
     "target-endian": "little",
-    "target-word-size": "32",
+    "target-pointer-width": "32",
     "arch": "x86",
     "os": "foo",
     "morestack": false
index 5e0f0f40e67bc8e1c95dc939d5a01d4980f4ed07..688bbe46bfaf0593b6df26e2a1035ee0952ee272 100644 (file)
@@ -3,7 +3,7 @@
     "data-layout": "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",
     "llvm-target": "x86_64-unknown-linux-gnu",
     "target-endian": "little",
-    "target-word-size": "64",
+    "target-pointer-width": "64",
     "arch": "x86_64",
     "os": "linux",
     "morestack": false