Skip to content

libbacktrace is always built without optimization #48903

Closed
@comex

Description

@comex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions