From 544fe12b1721183bb36d3357d55fa34b1cb547d1 Mon Sep 17 00:00:00 2001 From: ashneverdawn Date: Sun, 23 Aug 2020 21:16:55 -0400 Subject: [PATCH 1/4] make "fast build" config 40% faster on mac --- .cargo/config_fast_builds | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.cargo/config_fast_builds b/.cargo/config_fast_builds index 71ae452ac4205..98325718be7a1 100644 --- a/.cargo/config_fast_builds +++ b/.cargo/config_fast_builds @@ -7,8 +7,10 @@ linker = "/usr/bin/clang" rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"] +# NOTE: you must manually install https://github.com/michaeleisel/zld on mac. you can easily do this with the "brew" package manager: +# `brew install michaeleisel/zld/zld` [target.x86_64-apple-darwin] -rustflags = ["-Zshare-generics=y"] +rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/Cellar/zld/1.1.0/bin/zld", "-Zshare-generics=y"] [target.x86_64-pc-windows-msvc] linker = "rust-lld.exe" From 27c3902811601dd92b6bcec6f50494d6d1e1ba28 Mon Sep 17 00:00:00 2001 From: ashneverdawn Date: Sun, 23 Aug 2020 23:30:39 -0400 Subject: [PATCH 2/4] update zld path --- .cargo/config_fast_builds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config_fast_builds b/.cargo/config_fast_builds index 98325718be7a1..bf2a615a31fda 100644 --- a/.cargo/config_fast_builds +++ b/.cargo/config_fast_builds @@ -10,7 +10,7 @@ rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"] # NOTE: you must manually install https://github.com/michaeleisel/zld on mac. you can easily do this with the "brew" package manager: # `brew install michaeleisel/zld/zld` [target.x86_64-apple-darwin] -rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/Cellar/zld/1.1.0/bin/zld", "-Zshare-generics=y"] +rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"] [target.x86_64-pc-windows-msvc] linker = "rust-lld.exe" From 9d2b9f6b1553bc2ccc73cd982c29e1c41a4631e4 Mon Sep 17 00:00:00 2001 From: ashneverdawn Date: Thu, 3 Sep 2020 18:57:30 -0400 Subject: [PATCH 3/4] improve iterative compile times --- .cargo/config_fast_builds | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.cargo/config_fast_builds b/.cargo/config_fast_builds index bf2a615a31fda..2d070270d2b24 100644 --- a/.cargo/config_fast_builds +++ b/.cargo/config_fast_builds @@ -14,4 +14,7 @@ rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"] [target.x86_64-pc-windows-msvc] linker = "rust-lld.exe" -rustflags = ["-Zshare-generics=y"] \ No newline at end of file +rustflags = ["-Zshare-generics=y"] + +[profile.dev] +debug = 1 \ No newline at end of file From bf8c7732d1431bab8147684360353956839043cd Mon Sep 17 00:00:00 2001 From: ashneverdawn Date: Thu, 3 Sep 2020 22:12:40 -0400 Subject: [PATCH 4/4] comment out debug=1 and add description --- .cargo/config_fast_builds | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.cargo/config_fast_builds b/.cargo/config_fast_builds index 2d070270d2b24..12d12048a83d6 100644 --- a/.cargo/config_fast_builds +++ b/.cargo/config_fast_builds @@ -16,5 +16,7 @@ rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"] linker = "rust-lld.exe" rustflags = ["-Zshare-generics=y"] -[profile.dev] -debug = 1 \ No newline at end of file +# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only' +# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains. +#[profile.dev] +#debug = 1 \ No newline at end of file