Closed
Description
If CFG_DISABLE_OPTIMIZE is set in the environment, and I run ../configure --enable-optimize
, I would expect an optimized build. However, this seems to have the effect of building an optimized LLVM but not an optimized rustc. (Doing VERBOSE=1 make rustc-stage1
, I see the -O3 flag in the LLVM compile command lines, but no -O flag in the Rust compile commands.) The Makefile.in
suggests my suspicion is right:
ifdef CFG_DISABLE_OPTIMIZE
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
CFG_RUSTC_FLAGS +=
else
CFG_RUSTC_FLAGS += -O
endif
If this is the intended behavior, it should at least be documented.