-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix propagating cmake exit code from gen-buildsys.sh #95408
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
Conversation
While looking at dotnet#95405 I noticed that we didn't fail the build when the cmake configure step failed but tried to run the build regardless. The reason is because in ece10ad another command `popd` was added after the cmake invocation which overwrote the exit code so build-commons.sh didn't know cmake failed.
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsWhile looking at #95405 I noticed that we didn't fail the build when the cmake configure step failed but tried to run the build regardless. The reason is because in ece10ad another command
|
|
Alternatively, can we change the script to use the -S and -B flags so we don't need the pushd/pops in the first place? |
|
@jkoritzinsky I didn't do that because of runtime/eng/native/gen-buildsys.sh Lines 107 to 108 in b95bccb
|
|
Yup it's 3.20 now: #86530 |
| -B "$3" | ||
|
|
||
| popd | ||
| exit $? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still keeping this so it's clearer for the next person touching this line that the exit code is important
|
Duplicate of #94353? |
|
Thanks, closing this one then. |
…em (#94353) * Successfully replaced pushd/popd with CMake's -S/-B in gen-buildsys.sh for native and clr. Now, looking into removing other instances if possible. * Removed redundant pushd/popd in src/native/libs/build-native.cmd * Experimenting with removing 'pushd/popd' for Wasm/Wasi. * Restored pushd/popd to eng/native/build-commons.sh because it is actually not directly related to CMake. * Add explicit exit code to gen-buildsys.sh Make sure we don't forget to return the cmake exist code, see #95408. * Replace with comment instead --------- Co-authored-by: Alexander Köplinger <[email protected]>
While looking at #95405 I noticed that we didn't fail the build when the cmake configure step failed but tried to run the build regardless.
The reason is because in ece10ad another command
popdwas added after the cmake invocation which overwrote the exit code so build-commons.sh didn't know cmake failed.We can use the
-Sand-Bflags to set the directories instead again now that we use a new enough minimum CMake version.