Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbacktrace is always built without optimization #48903

Closed
comex opened this issue Mar 10, 2018 · 0 comments
Closed

libbacktrace is always built without optimization #48903

comex opened this issue Mar 10, 2018 · 0 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@comex
Copy link
Contributor

comex commented Mar 10, 2018

Excerpt from rustc build (note: I needed to patch the bootstrap code to get it to be verbose enough, which I'm going to submit as a PR):

running: "/tmp/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "--target" "x86_64-apple-darwin"
"-j" "8" "-v" "-v" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path"
"/Users/comex/src/rust/src/libstd/Cargo.toml" "--message-format" "json"

[…]

running: "sh" "/Users/comex/src/rust/src/libstd/../libbacktrace/configure" "--with-pic"
"--disable-multilib" "--disable-shared" "--disable-host-shared" "--host=x8

[…]

running: "make" "INCDIR=/Users/comex/src/rust/src/libstd/../libbacktrace" "-j" "8"

[…]

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I/Users/comex/src/rust/src/libstd/../libbacktrace -I
/Users/comex/src/rust/src/libstd/../libbacktrace/../include -I
/Users/comex/src/rust/src/libstd/../libbacktrace/../libgcc -I ../libgcc -funwind-tables
-frandom-seed=state.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -Wcast-qual -fPIC -ffunction-sections
-fdata-sections -fPIC -m64 -stdlib=libc++ -fvisibility=hidden -c
/Users/comex/src/rust/src/libstd/../libbacktrace/state.c  -fno-common -DPIC -o state.o

Note that the cargo build invocation contains --release, but there's no -O in the cc command line.

I also verified that the disassembly looks unoptimized.

@kennytm kennytm added I-slow Issue: Problems and improvements with respect to performance of generated code. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 10, 2018
@bors bors closed this as completed in 1999a3f Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants