alphaville / optimization-engine

Nonconvex embedded optimization: code generation for fast real-time optimization + ROS support
https://alphaville.github.io/optimization-engine/
Other
499 stars 53 forks source link

Should there be an -O3 in icasadi's build.rs? #126

Closed alphaville closed 4 years ago

alphaville commented 4 years ago

Not sure whether there should be an optional -O3 in icasadi's build.rs, that is

 cc::Build::new()
        .flag_if_supported("-Wall")
        .flag_if_supported("-Wpedantic")
        .flag_if_supported("-Wno-long-long")
        .flag_if_supported("-Wno-unused-parameter")
        .flag_if_supported("-O3")

If we compile the Rust code with --release does the associated C code (auto-generated C files by CasADi) get compiled with appropriate optimization flags?

korken89 commented 4 years ago

It is fine :) cc takes info from the build info: https://docs.rs/cc/1.0.1/cc/struct.Build.html#method.opt_level

alphaville commented 4 years ago

:+1: Thanks a lot!