summaryrefslogtreecommitdiff
path: root/packages/dev-lang/rust/files/rustbuild.patch
blob: c24947a0c06f0183f43be522c5b2fea5f43f5ad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
From 81d2629c7fe86244b31b6528714c0256c7806325 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 25 Apr 2017 15:34:31 -0700
Subject: [PATCH 01/15] Build the rustc-src tarball before the rust-src
 component

---
 src/bootstrap/dist.rs | 60 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 33 insertions(+), 27 deletions(-)

diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 4328c4e3f1..e8c9a96b22 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -369,13 +369,11 @@ pub fn rust_src(build: &Build) {
 
     println!("Dist src");
 
-    let name = pkgname(build, "rust-src");
-    let image = tmpdir(build).join(format!("{}-image", name));
-    let _ = fs::remove_dir_all(&image);
-
-    let dst = image.join("lib/rustlib/src");
-    let dst_src = dst.join("rust");
-    t!(fs::create_dir_all(&dst_src));
+    // Make sure that the root folder of tarball has the correct name
+    let plain_name = format!("rustc-{}-src", build.rust_package_vers());
+    let plain_dst_src = tmpdir(build).join(&plain_name);
+    let _ = fs::remove_dir_all(&plain_dst_src);
+    t!(fs::create_dir_all(&plain_dst_src));
 
     // This is the set of root paths which will become part of the source package
     let src_files = [
@@ -424,13 +422,13 @@ pub fn rust_src(build: &Build) {
 
     // Copy the directories using our filter
     for item in &src_dirs {
-        let dst = &dst_src.join(item);
+        let dst = &plain_dst_src.join(item);
         t!(fs::create_dir(dst));
         cp_filtered(&build.src.join(item), dst, &filter_fn);
     }
     // Copy the files normally
     for item in &src_files {
-        copy(&build.src.join(item), &dst_src.join(item));
+        copy(&build.src.join(item), &plain_dst_src.join(item));
     }
 
     // If we're building from git sources, we need to vendor a complete distribution.
@@ -455,10 +453,35 @@ pub fn rust_src(build: &Build) {
         // Vendor all Cargo dependencies
         let mut cmd = Command::new(&build.cargo);
         cmd.arg("vendor")
-           .current_dir(&dst_src.join("src"));
+           .current_dir(&plain_dst_src.join("src"));
         build.run(&mut cmd);
     }
 
+    // Create the version file
+    write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
+
+    // Create plain source tarball
+    let tarball = rust_src_location(build);
+    if let Some(dir) = tarball.parent() {
+        t!(fs::create_dir_all(dir));
+    }
+    let mut cmd = Command::new("tar");
+    cmd.arg("-czf").arg(sanitize_sh(&tarball))
+       .arg(&plain_name)
+       .current_dir(tmpdir(build));
+    build.run(&mut cmd);
+
+
+    let name = pkgname(build, "rust-src");
+    let image = tmpdir(build).join(format!("{}-image", name));
+    let _ = fs::remove_dir_all(&image);
+
+    let dst = image.join("lib/rustlib/src");
+    let dst_src = dst.join("rust");
+    t!(fs::create_dir_all(&dst_src));
+
+    cp_r(&plain_dst_src, &dst_src);
+
     // Create source tarball in rust-installer format
     let mut cmd = Command::new(SH_CMD);
     cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
@@ -473,23 +496,6 @@ pub fn rust_src(build: &Build) {
        .arg("--legacy-manifest-dirs=rustlib,cargo");
     build.run(&mut cmd);
 
-    // Rename directory, so that root folder of tarball has the correct name
-    let plain_name = format!("rustc-{}-src", build.rust_package_vers());
-    let plain_dst_src = tmpdir(build).join(&plain_name);
-    let _ = fs::remove_dir_all(&plain_dst_src);
-    t!(fs::create_dir_all(&plain_dst_src));
-    cp_r(&dst_src, &plain_dst_src);
-
-    // Create the version file
-    write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
-
-    // Create plain source tarball
-    let mut cmd = Command::new("tar");
-    cmd.arg("-czf").arg(sanitize_sh(&rust_src_location(build)))
-       .arg(&plain_name)
-       .current_dir(tmpdir(build));
-    build.run(&mut cmd);
-
     t!(fs::remove_dir_all(&image));
     t!(fs::remove_dir_all(&plain_dst_src));
 }
-- 
2.13.0


From 6d36eeef3a343c173a483b5684203e832128147c Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Tue, 25 Apr 2017 15:58:07 -0700
Subject: [PATCH 02/15] Reduce the contents of the rust-src component

---
 src/bootstrap/dist.rs | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index e8c9a96b22..7e04b3660c 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -480,7 +480,35 @@ pub fn rust_src(build: &Build) {
     let dst_src = dst.join("rust");
     t!(fs::create_dir_all(&dst_src));
 
-    cp_r(&plain_dst_src, &dst_src);
+    // This is the reduced set of paths which will become the rust-src component
+    // (essentially libstd and all of its path dependencies)
+    let std_src_dirs = [
+        "src/build_helper",
+        "src/liballoc",
+        "src/liballoc_jemalloc",
+        "src/liballoc_system",
+        "src/libcollections",
+        "src/libcompiler_builtins",
+        "src/libcore",
+        "src/liblibc",
+        "src/libpanic_abort",
+        "src/libpanic_unwind",
+        "src/librand",
+        "src/librustc_asan",
+        "src/librustc_lsan",
+        "src/librustc_msan",
+        "src/librustc_tsan",
+        "src/libstd",
+        "src/libstd_unicode",
+        "src/libunwind",
+        "src/rustc/libc_shim",
+    ];
+
+    for item in &std_src_dirs {
+        let dst = &dst_src.join(item);
+        t!(fs::create_dir_all(dst));
+        cp_r(&plain_dst_src.join(item), dst);
+    }
 
     // Create source tarball in rust-installer format
     let mut cmd = Command::new(SH_CMD);
-- 
2.13.0


From f74eacf847c15a6261122d7a20d21dff926fbd28 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Wed, 26 Apr 2017 12:37:12 -0700
Subject: [PATCH 03/15] Add a distcheck for rust-src completeness

---
 src/bootstrap/check.rs | 21 +++++++++++++++++++++
 src/bootstrap/dist.rs  |  7 +++++++
 2 files changed, 28 insertions(+)

diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index f8f641060c..e05520429e 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -645,6 +645,7 @@ pub fn distcheck(build: &Build) {
         return
     }
 
+    println!("Distcheck");
     let dir = build.out.join("tmp").join("distcheck");
     let _ = fs::remove_dir_all(&dir);
     t!(fs::create_dir_all(&dir));
@@ -662,6 +663,26 @@ pub fn distcheck(build: &Build) {
     build.run(Command::new(build_helper::make(&build.config.build))
                      .arg("check")
                      .current_dir(&dir));
+
+    // Now make sure that rust-src has all of libstd's dependencies
+    println!("Distcheck rust-src");
+    let dir = build.out.join("tmp").join("distcheck-src");
+    let _ = fs::remove_dir_all(&dir);
+    t!(fs::create_dir_all(&dir));
+
+    let mut cmd = Command::new("tar");
+    cmd.arg("-xzf")
+       .arg(dist::rust_src_installer(build))
+       .arg("--strip-components=1")
+       .current_dir(&dir);
+    build.run(&mut cmd);
+
+    let toml = dir.join("rust-src/lib/rustlib/src/rust/src/libstd/Cargo.toml");
+    build.run(Command::new(&build.cargo)
+                     .arg("generate-lockfile")
+                     .arg("--manifest-path")
+                     .arg(&toml)
+                     .current_dir(&dir));
 }
 
 /// Test the build system itself
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 7e04b3660c..5db9ac8295 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -310,11 +310,18 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) {
     t!(fs::remove_dir_all(&image));
 }
 
+/// The path to the complete rustc-src tarball
 pub fn rust_src_location(build: &Build) -> PathBuf {
     let plain_name = format!("rustc-{}-src", build.rust_package_vers());
     distdir(build).join(&format!("{}.tar.gz", plain_name))
 }
 
+/// The path to the rust-src component installer
+pub fn rust_src_installer(build: &Build) -> PathBuf {
+    let name = pkgname(build, "rust-src");
+    distdir(build).join(&format!("{}.tar.gz", name))
+}
+
 /// Creates a tarball of save-analysis metadata, if available.
 pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
     assert!(build.config.extended);
-- 
2.13.0


From 07a55b27aa9e44208db279d3557da1d9e27c8f66 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 27 Apr 2017 11:51:02 +0200
Subject: [PATCH 04/15] rustbuild: build cargo and rls as part of extended
 build

Build them directly in the `./x.py build` phase, don't wait for
`./x.py dist`

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/step.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs
index 17902a39df..ed83deef76 100644
--- a/src/bootstrap/step.rs
+++ b/src/bootstrap/step.rs
@@ -571,6 +571,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
          .dep(|s| s.name("libstd-tool"))
          .run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-client"));
     rules.build("tool-cargo", "cargo")
+         .default(build.config.extended)
          .dep(|s| s.name("maybe-clean-tools"))
          .dep(|s| s.name("libstd-tool"))
          .dep(|s| s.stage(0).host(s.target).name("openssl"))
@@ -584,6 +585,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
          .run(move |s| compile::tool(build, s.stage, s.target, "cargo"));
     rules.build("tool-rls", "rls")
          .host(true)
+         .default(build.config.extended)
          .dep(|s| s.name("librustc-tool"))
          .dep(|s| s.stage(0).host(s.target).name("openssl"))
          .dep(move |s| {
-- 
2.13.0


From 4f1e33cecb7d37c1c871a72afedcffdf0c5d66dd Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 27 Apr 2017 11:52:48 +0200
Subject: [PATCH 05/15] rustbuild: pass version number as param in install
 phase

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index d508616e4b..e99451fd52 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -46,24 +46,24 @@ pub fn install(build: &Build, stage: u32, host: &str) {
     let empty_dir = build.out.join("tmp/empty_dir");
     t!(fs::create_dir_all(&empty_dir));
     if build.config.docs {
-        install_sh(&build, "docs", "rust-docs", stage, host, &prefix,
-                   &docdir, &libdir, &mandir, &empty_dir);
+        install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
+                   stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
     }
 
     for target in build.config.target.iter() {
-        install_sh(&build, "std", "rust-std", stage, target, &prefix,
+        install_sh(&build, "std", "rust-std", &build.rust_package_vers(), stage, target, &prefix,
                    &docdir, &libdir, &mandir, &empty_dir);
     }
 
-    install_sh(&build, "rustc", "rustc", stage, host, &prefix,
+    install_sh(&build, "rustc", "rustc", &build.rust_package_vers(), stage, host, &prefix,
                &docdir, &libdir, &mandir, &empty_dir);
     t!(fs::remove_dir_all(&empty_dir));
 }
 
-fn install_sh(build: &Build, package: &str, name: &str, stage: u32, host: &str,
+fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
               prefix: &Path, docdir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
     println!("Install {} stage{} ({})", package, stage, host);
-    let package_name = format!("{}-{}-{}", name, build.rust_package_vers(), host);
+    let package_name = format!("{}-{}-{}", name, version, host);
 
     let mut cmd = Command::new("sh");
     cmd.current_dir(empty_dir)
-- 
2.13.0


From 38c7b79f37d522e449858e7db91dba23631d2e47 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 27 Apr 2017 11:49:03 +0200
Subject: [PATCH 06/15] rustbuild: add rls_package_vers

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/lib.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 5e046f4167..180a2bbaa4 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -1028,6 +1028,11 @@ impl Build {
         self.package_vers(&self.release_num("cargo"))
     }
 
+    /// Returns the value of `package_vers` above for rls
+    fn rls_package_vers(&self) -> String {
+        self.package_vers(&self.release_num("rls"))
+    }
+
     /// Returns the `version` string associated with this compiler for Rust
     /// itself.
     ///
-- 
2.13.0


From ce4ccd8fb28bd6e1362eabc0c7219dea5e9becaa Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 27 Apr 2017 11:53:18 +0200
Subject: [PATCH 07/15] rustbuild: install cargo and rls when extended build is
 enabled

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index e99451fd52..b8dde1df72 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -51,12 +51,20 @@ pub fn install(build: &Build, stage: u32, host: &str) {
     }
 
     for target in build.config.target.iter() {
-        install_sh(&build, "std", "rust-std", &build.rust_package_vers(), stage, target, &prefix,
-                   &docdir, &libdir, &mandir, &empty_dir);
+        install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
+                   stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+    }
+
+    install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
+               stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+
+    if build.config.extended {
+        install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
+                   stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+        install_sh(&build, "rls", "rls", &build.rls_package_vers(),
+                   stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
     }
 
-    install_sh(&build, "rustc", "rustc", &build.rust_package_vers(), stage, host, &prefix,
-               &docdir, &libdir, &mandir, &empty_dir);
     t!(fs::remove_dir_all(&empty_dir));
 }
 
-- 
2.13.0


From be7b09c1113671cb3edd4ef95541e894bec77212 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 27 Apr 2017 15:05:29 +0200
Subject: [PATCH 08/15] rustbuild: install rustc after cargo and rls

This way its files take precedence (e.g. README.md and stuff)

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index b8dde1df72..c805522fbf 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -55,9 +55,6 @@ pub fn install(build: &Build, stage: u32, host: &str) {
                    stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
     }
 
-    install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-               stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
-
     if build.config.extended {
         install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
                    stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
@@ -65,6 +62,9 @@ pub fn install(build: &Build, stage: u32, host: &str) {
                    stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
     }
 
+    install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
+               stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+
     t!(fs::remove_dir_all(&empty_dir));
 }
 
-- 
2.13.0


From 6ca14569b476f4b62280ce4875a06e33727f9f75 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Fri, 28 Apr 2017 10:48:49 +0200
Subject: [PATCH 09/15] rustbuild: only build cargo for host

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/step.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs
index ed83deef76..909fcdd4ab 100644
--- a/src/bootstrap/step.rs
+++ b/src/bootstrap/step.rs
@@ -571,6 +571,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
          .dep(|s| s.name("libstd-tool"))
          .run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-client"));
     rules.build("tool-cargo", "cargo")
+         .host(true)
          .default(build.config.extended)
          .dep(|s| s.name("maybe-clean-tools"))
          .dep(|s| s.name("libstd-tool"))
-- 
2.13.0


From 21b9870acb7da3c6c572875899754e390f1ebbb2 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Fri, 28 Apr 2017 10:58:46 +0200
Subject: [PATCH 10/15] rustbuild: pass bindir to install_sh

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index c805522fbf..c16e6c7281 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -25,14 +25,17 @@ use dist::{sanitize_sh, tmpdir};
 pub fn install(build: &Build, stage: u32, host: &str) {
     let prefix_default = PathBuf::from("/usr/local");
     let docdir_default = PathBuf::from("share/doc/rust");
-    let mandir_default = PathBuf::from("share/man");
+    let bindir_default = PathBuf::from("bin");
     let libdir_default = PathBuf::from("lib");
+    let mandir_default = PathBuf::from("share/man");
     let prefix = build.config.prefix.as_ref().unwrap_or(&prefix_default);
     let docdir = build.config.docdir.as_ref().unwrap_or(&docdir_default);
+    let bindir = build.config.bindir.as_ref().unwrap_or(&bindir_default);
     let libdir = build.config.libdir.as_ref().unwrap_or(&libdir_default);
     let mandir = build.config.mandir.as_ref().unwrap_or(&mandir_default);
 
     let docdir = prefix.join(docdir);
+    let bindir = prefix.join(bindir);
     let libdir = prefix.join(libdir);
     let mandir = prefix.join(mandir);
 
@@ -40,6 +43,7 @@ pub fn install(build: &Build, stage: u32, host: &str) {
 
     let prefix = add_destdir(&prefix, &destdir);
     let docdir = add_destdir(&docdir, &destdir);
+    let bindir = add_destdir(&bindir, &destdir);
     let libdir = add_destdir(&libdir, &destdir);
     let mandir = add_destdir(&mandir, &destdir);
 
@@ -47,29 +51,29 @@ pub fn install(build: &Build, stage: u32, host: &str) {
     t!(fs::create_dir_all(&empty_dir));
     if build.config.docs {
         install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-                   stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+                   stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
     }
 
     for target in build.config.target.iter() {
         install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-                   stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+                   stage, target, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
     }
 
     if build.config.extended {
         install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-                   stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+                   stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
         install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-                   stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+                   stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
     }
 
     install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-               stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
+               stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
 
     t!(fs::remove_dir_all(&empty_dir));
 }
 
 fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
-              prefix: &Path, docdir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
+              prefix: &Path, docdir: &Path, bindir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
     println!("Install {} stage{} ({})", package, stage, host);
     let package_name = format!("{}-{}-{}", name, version, host);
 
@@ -78,6 +82,7 @@ fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u3
        .arg(sanitize_sh(&tmpdir(build).join(&package_name).join("install.sh")))
        .arg(format!("--prefix={}", sanitize_sh(prefix)))
        .arg(format!("--docdir={}", sanitize_sh(docdir)))
+       .arg(format!("--bindir={}", sanitize_sh(bindir)))
        .arg(format!("--libdir={}", sanitize_sh(libdir)))
        .arg(format!("--mandir={}", sanitize_sh(mandir)))
        .arg("--disable-ldconfig");
-- 
2.13.0


From 9b844f5676f93a022d49a058347fcf08518381b5 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Fri, 28 Apr 2017 11:08:47 +0200
Subject: [PATCH 11/15] rustbuild: pass sysconfdir to install_sh

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index c16e6c7281..386b001971 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -24,16 +24,19 @@ use dist::{sanitize_sh, tmpdir};
 /// Installs everything.
 pub fn install(build: &Build, stage: u32, host: &str) {
     let prefix_default = PathBuf::from("/usr/local");
+    let sysconfdir_default = PathBuf::from("/etc");
     let docdir_default = PathBuf::from("share/doc/rust");
     let bindir_default = PathBuf::from("bin");
     let libdir_default = PathBuf::from("lib");
     let mandir_default = PathBuf::from("share/man");
     let prefix = build.config.prefix.as_ref().unwrap_or(&prefix_default);
+    let sysconfdir = build.config.sysconfdir.as_ref().unwrap_or(&sysconfdir_default);
     let docdir = build.config.docdir.as_ref().unwrap_or(&docdir_default);
     let bindir = build.config.bindir.as_ref().unwrap_or(&bindir_default);
     let libdir = build.config.libdir.as_ref().unwrap_or(&libdir_default);
     let mandir = build.config.mandir.as_ref().unwrap_or(&mandir_default);
 
+    let sysconfdir = prefix.join(sysconfdir);
     let docdir = prefix.join(docdir);
     let bindir = prefix.join(bindir);
     let libdir = prefix.join(libdir);
@@ -42,6 +45,7 @@ pub fn install(build: &Build, stage: u32, host: &str) {
     let destdir = env::var_os("DESTDIR").map(PathBuf::from);
 
     let prefix = add_destdir(&prefix, &destdir);
+    let sysconfdir = add_destdir(&sysconfdir, &destdir);
     let docdir = add_destdir(&docdir, &destdir);
     let bindir = add_destdir(&bindir, &destdir);
     let libdir = add_destdir(&libdir, &destdir);
@@ -51,29 +55,35 @@ pub fn install(build: &Build, stage: u32, host: &str) {
     t!(fs::create_dir_all(&empty_dir));
     if build.config.docs {
         install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-                   stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
+                   stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   &mandir, &empty_dir);
     }
 
     for target in build.config.target.iter() {
         install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-                   stage, target, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
+                   stage, target, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   &mandir, &empty_dir);
     }
 
     if build.config.extended {
         install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-                   stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
+                   stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   &mandir, &empty_dir);
         install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-                   stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
+                   stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   &mandir, &empty_dir);
     }
 
     install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-               stage, host, &prefix, &docdir, &bindir, &libdir, &mandir, &empty_dir);
+               stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+               &mandir, &empty_dir);
 
     t!(fs::remove_dir_all(&empty_dir));
 }
 
 fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
-              prefix: &Path, docdir: &Path, bindir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
+              prefix: &Path, sysconfdir: &Path, docdir: &Path, bindir: &Path, libdir: &Path,
+              mandir: &Path, empty_dir: &Path) {
     println!("Install {} stage{} ({})", package, stage, host);
     let package_name = format!("{}-{}-{}", name, version, host);
 
@@ -81,6 +91,7 @@ fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u3
     cmd.current_dir(empty_dir)
        .arg(sanitize_sh(&tmpdir(build).join(&package_name).join("install.sh")))
        .arg(format!("--prefix={}", sanitize_sh(prefix)))
+       .arg(format!("--sysconfdir={}", sanitize_sh(sysconfdir)))
        .arg(format!("--docdir={}", sanitize_sh(docdir)))
        .arg(format!("--bindir={}", sanitize_sh(bindir)))
        .arg(format!("--libdir={}", sanitize_sh(libdir)))
-- 
2.13.0


From cb9e3d84a3827d6370059650a2883cb25e516f4a Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Wed, 17 May 2017 12:15:15 +0200
Subject: [PATCH 12/15] rustbuild: install rust-analysis and rust-src when
 extended build is enabled

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index 386b001971..5d5ee67c95 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -55,37 +55,47 @@ pub fn install(build: &Build, stage: u32, host: &str) {
     t!(fs::create_dir_all(&empty_dir));
     if build.config.docs {
         install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
-                   stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
                    &mandir, &empty_dir);
     }
 
     for target in build.config.target.iter() {
         install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
-                   stage, target, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   stage, Some(target), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
                    &mandir, &empty_dir);
     }
 
     if build.config.extended {
         install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
-                   stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
                    &mandir, &empty_dir);
         install_sh(&build, "rls", "rls", &build.rls_package_vers(),
-                   stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   &mandir, &empty_dir);
+        install_sh(&build, "analysis", "rust-analysis", &build.rust_package_vers(),
+                   stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+                   &mandir, &empty_dir);
+        install_sh(&build, "src", "rust-src", &build.rust_package_vers(),
+                   stage, None, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
                    &mandir, &empty_dir);
     }
 
     install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
-               stage, host, &prefix, &sysconfdir, &docdir, &bindir, &libdir,
+               stage, Some(host), &prefix, &sysconfdir, &docdir, &bindir, &libdir,
                &mandir, &empty_dir);
 
     t!(fs::remove_dir_all(&empty_dir));
 }
 
-fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
+fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: Option<&str>,
               prefix: &Path, sysconfdir: &Path, docdir: &Path, bindir: &Path, libdir: &Path,
               mandir: &Path, empty_dir: &Path) {
-    println!("Install {} stage{} ({})", package, stage, host);
-    let package_name = format!("{}-{}-{}", name, version, host);
+    println!("Install {} stage{} ({:?})", package, stage, host);
+    let package_name = if let Some(host) = host {
+        format!("{}-{}-{}", name, version, host)
+    } else {
+        format!("{}-{}", name, version)
+    };
 
     let mut cmd = Command::new("sh");
     cmd.current_dir(empty_dir)
-- 
2.13.0


From 5cab29ea346c58f63e2cf272c18588f77d3f94b1 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Fri, 28 Apr 2017 11:01:15 +0200
Subject: [PATCH 13/15] rustbuild: allow configuring bindir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/config.rs           | 10 ++++++++--
 src/bootstrap/config.toml.example |  9 ++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 34fbc33d98..c800508cdb 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -100,6 +100,7 @@ pub struct Config {
     pub musl_root: Option<PathBuf>,
     pub prefix: Option<PathBuf>,
     pub docdir: Option<PathBuf>,
+    pub bindir: Option<PathBuf>,
     pub libdir: Option<PathBuf>,
     pub libdir_relative: Option<PathBuf>,
     pub mandir: Option<PathBuf>,
@@ -165,9 +166,10 @@ struct Build {
 #[derive(RustcDecodable, Default, Clone)]
 struct Install {
     prefix: Option<String>,
-    mandir: Option<String>,
     docdir: Option<String>,
+    bindir: Option<String>,
     libdir: Option<String>,
+    mandir: Option<String>,
 }
 
 /// TOML representation of how the LLVM build is configured.
@@ -315,9 +317,10 @@ impl Config {
 
         if let Some(ref install) = toml.install {
             config.prefix = install.prefix.clone().map(PathBuf::from);
-            config.mandir = install.mandir.clone().map(PathBuf::from);
             config.docdir = install.docdir.clone().map(PathBuf::from);
+            config.bindir = install.bindir.clone().map(PathBuf::from);
             config.libdir = install.libdir.clone().map(PathBuf::from);
+            config.mandir = install.mandir.clone().map(PathBuf::from);
         }
 
         if let Some(ref llvm) = toml.llvm {
@@ -526,6 +529,9 @@ impl Config {
                 "CFG_DOCDIR" => {
                     self.docdir = Some(PathBuf::from(value));
                 }
+                "CFG_BINDIR" => {
+                    self.bindir = Some(PathBuf::from(value));
+                }
                 "CFG_LIBDIR" => {
                     self.libdir = Some(PathBuf::from(value));
                 }
diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example
index fad7902204..b91317398d 100644
--- a/src/bootstrap/config.toml.example
+++ b/src/bootstrap/config.toml.example
@@ -160,15 +160,18 @@
 # Instead of installing to /usr/local, install to this path instead.
 #prefix = "/usr/local"
 
+# Where to install documentation in `prefix` above
+#docdir = "share/doc/rust"
+
+# Where to install binaries in `prefix` above
+#bindir = "bin"
+
 # Where to install libraries in `prefix` above
 #libdir = "lib"
 
 # Where to install man pages in `prefix` above
 #mandir = "share/man"
 
-# Where to install documentation in `prefix` above
-#docdir = "share/doc/rust"
-
 # =============================================================================
 # Options for compiling Rust code itself
 # =============================================================================
-- 
2.13.0


From f3bd42e156877fc63c77ab0981228d66f27a384b Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Fri, 28 Apr 2017 11:03:58 +0200
Subject: [PATCH 14/15] rustbuild: allow configuring sysconfdir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/config.rs           | 6 ++++++
 src/bootstrap/config.toml.example | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index c800508cdb..b1e2727ca6 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -99,6 +99,7 @@ pub struct Config {
     // Fallback musl-root for all targets
     pub musl_root: Option<PathBuf>,
     pub prefix: Option<PathBuf>,
+    pub sysconfdir: Option<PathBuf>,
     pub docdir: Option<PathBuf>,
     pub bindir: Option<PathBuf>,
     pub libdir: Option<PathBuf>,
@@ -166,6 +167,7 @@ struct Build {
 #[derive(RustcDecodable, Default, Clone)]
 struct Install {
     prefix: Option<String>,
+    sysconfdir: Option<String>,
     docdir: Option<String>,
     bindir: Option<String>,
     libdir: Option<String>,
@@ -317,6 +319,7 @@ impl Config {
 
         if let Some(ref install) = toml.install {
             config.prefix = install.prefix.clone().map(PathBuf::from);
+            config.sysconfdir = install.sysconfdir.clone().map(PathBuf::from);
             config.docdir = install.docdir.clone().map(PathBuf::from);
             config.bindir = install.bindir.clone().map(PathBuf::from);
             config.libdir = install.libdir.clone().map(PathBuf::from);
@@ -526,6 +529,9 @@ impl Config {
                 "CFG_PREFIX" => {
                     self.prefix = Some(PathBuf::from(value));
                 }
+                "CFG_SYSCONFDIR" => {
+                    self.sysconfdir = Some(PathBuf::from(value));
+                }
                 "CFG_DOCDIR" => {
                     self.docdir = Some(PathBuf::from(value));
                 }
diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example
index b91317398d..f55599c0d6 100644
--- a/src/bootstrap/config.toml.example
+++ b/src/bootstrap/config.toml.example
@@ -160,6 +160,10 @@
 # Instead of installing to /usr/local, install to this path instead.
 #prefix = "/usr/local"
 
+# Where to install system configuration files
+# If this is a relative path, it will get installed in `prefix` above
+#sysconfdir = "/etc"
+
 # Where to install documentation in `prefix` above
 #docdir = "share/doc/rust"
 
-- 
2.13.0


From 14a25dbcb8e35be7312de7559b46856e902cdca7 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Tue, 6 Jun 2017 16:25:50 +0200
Subject: [PATCH 15/15] fix exherbo stable build

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/install.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index 5d5ee67c95..39822aa6dc 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -96,14 +96,13 @@ fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u3
     } else {
         format!("{}-{}", name, version)
     };
+    format!("{:?} {:?}", sysconfdir, bindir);
 
     let mut cmd = Command::new("sh");
     cmd.current_dir(empty_dir)
        .arg(sanitize_sh(&tmpdir(build).join(&package_name).join("install.sh")))
        .arg(format!("--prefix={}", sanitize_sh(prefix)))
-       .arg(format!("--sysconfdir={}", sanitize_sh(sysconfdir)))
        .arg(format!("--docdir={}", sanitize_sh(docdir)))
-       .arg(format!("--bindir={}", sanitize_sh(bindir)))
        .arg(format!("--libdir={}", sanitize_sh(libdir)))
        .arg(format!("--mandir={}", sanitize_sh(mandir)))
        .arg("--disable-ldconfig");
-- 
2.13.0

From fee7c68e59b452cd637ba91532d6b77baa95ef10 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Wed, 7 Jun 2017 17:53:23 +0200
Subject: [PATCH] Include rustc version in metadata

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/cargo/ops/cargo_rustc/context.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cargo/src/cargo/ops/cargo_rustc/context.rs b/cargo/src/cargo/ops/cargo_rustc/context.rs
index 1b1242f903..f569c1befb 100644
--- a/cargo/src/cargo/ops/cargo_rustc/context.rs
+++ b/cargo/src/cargo/ops/cargo_rustc/context.rs
@@ -482,6 +482,10 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
         unit.target.name().hash(&mut hasher);
         unit.target.kind().hash(&mut hasher);
 
+        if let Ok(ref rustc) = self.config.rustc() {
+            rustc.verbose_version.hash(&mut hasher);
+        }
+
         Some(Metadata(hasher.finish()))
     }
 
From c7afc348b83b2267ce2bae405f0f023a404481d4 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Fri, 16 Jun 2017 10:30:52 +0200
Subject: [PATCH] fix comment

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
 src/bootstrap/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 180a2bbaa4..8272fb4a80 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -507,7 +507,7 @@ impl Build {
                  .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
         }
 
-        // There are two invariants we try must maintain:
+        // There are two invariants we must maintain:
         // * stable crates cannot depend on unstable crates (general Rust rule),
         // * crates that end up in the sysroot must be unstable (rustbuild rule).
         //
-- 
2.13.1