Skip to content

Commit

Permalink
chore: Reduce compile time (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Jan 31, 2023
1 parent 543072c commit 4033e8b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,17 @@ git-fetch-with-cli = true
[cargo-new]
email = "[email protected]"
name = "강동윤"

# 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/bin/zld", "-Zshare-generics=y"]

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/bin/zld", "-Zshare-generics=y"]

# 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
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

1. Clone stc.
2. Run `yarn` in the cloned directory.
3. (mac only) Install zld

```sh
brew install michaeleisel/zld/zld
```

## Typical workflow

Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"libstd",
"libtest",
"lvalue",
"michaeleisel",
"MIMALLOC",
"multiresult",
"nonminimal",
Expand Down

0 comments on commit 4033e8b

Please sign in to comment.