mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-11 21:05:20 +08:00
Create release-with-debug cargo profile, hook it up with cmake
Fixes #10959 (cherry picked from commit 66b80041cc84d067662af9f07cdbca4d22379bab)
This commit is contained in:
parent
701853fdd3
commit
f75912d205
@ -56,7 +56,7 @@ function(CREATE_TARGET target)
|
|||||||
${Rust_CARGO}
|
${Rust_CARGO}
|
||||||
build --bin ${target}
|
build --bin ${target}
|
||||||
$<$<CONFIG:Release>:--release>
|
$<$<CONFIG:Release>:--release>
|
||||||
$<$<CONFIG:RelWithDebInfo>:--release>
|
$<$<CONFIG:RelWithDebInfo>:--profile=release-with-debug>
|
||||||
--target ${Rust_CARGO_TARGET}
|
--target ${Rust_CARGO_TARGET}
|
||||||
--no-default-features
|
--no-default-features
|
||||||
${CARGO_FLAGS}
|
${CARGO_FLAGS}
|
||||||
|
@ -10,6 +10,10 @@ edition = "2021"
|
|||||||
overflow-checks = true
|
overflow-checks = true
|
||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
|
[profile.release-with-debug]
|
||||||
|
inherits = "release"
|
||||||
|
debug = true
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "fish"
|
name = "fish"
|
||||||
version = "4.0.0-beta.1"
|
version = "4.0.0-beta.1"
|
||||||
|
@ -22,7 +22,7 @@ else()
|
|||||||
set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_HOST_TARGET}")
|
set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_HOST_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(rust_profile $<IF:$<CONFIG:Debug>,debug,release>)
|
set(rust_profile $<IF:$<CONFIG:Debug>,debug,$<IF:$<CONFIG:RelWithDebInfo>,release-with-debug,release>>)
|
||||||
set(rust_debugflags "$<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g>")
|
set(rust_debugflags "$<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g>")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user