-
Notifications
You must be signed in to change notification settings - Fork 455
Miscellaneous EVG compilation script improvements #1710
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
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.
LGTM with minor suggestions.
.evergreen/scripts/compile-unix.sh
Outdated
@@ -82,8 +82,14 @@ configure_flags_append_if_not_null SRV "-DENABLE_SRV=${SRV}" | |||
configure_flags_append_if_not_null TRACING "-DENABLE_TRACING=${TRACING}" | |||
configure_flags_append_if_not_null ZLIB "-DENABLE_ZLIB=${ZLIB}" | |||
|
|||
if [[ "${DEBUG:-}" == "ON" && "${RELEASE:-}" == "ON" ]]; then |
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.
We should consider refactoring the config to use only one or the other.
Consider removing RELEASE
since it appears unused. Though it could be done in a future PR.
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.
RELEASE
is used by the release-compile
EVG task. It may be preferable to remove DEBUG
instead and let all EVG tasks use Debug build type by default.
.evergreen/scripts/compile-unix.sh
Outdated
"${cmake_binary}" "${configure_flags[@]}" ${extra_configure_flags[@]+"${extra_configure_flags[@]}"} . | ||
"${cmake_binary}" --build . | ||
"${cmake_binary}" --install . | ||
"${cmake_binary}" -S . -B build "${configure_flags[@]}" ${extra_configure_flags[@]+"${extra_configure_flags[@]}"} . |
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.
"${cmake_binary}" -S . -B build "${configure_flags[@]}" ${extra_configure_flags[@]+"${extra_configure_flags[@]}"} . | |
"${cmake_binary}" -S . -B cmake-build "${configure_flags[@]}" ${extra_configure_flags[@]+"${extra_configure_flags[@]}"} . |
Consider using cmake-build
to avoid possibly interfering with existing files in the build
directory.
Latest changes verified by this patch. |
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.
LGTM with another DEBUG
removal.
@@ -736,7 +736,7 @@ def pre_commands(self) -> Iterable[Value]: | |||
commands=[ | |||
shell_mongoc( | |||
""" | |||
env SANITIZE=address DEBUG=ON SASL=AUTO SSL=OPENSSL EXTRA_CONFIGURE_FLAGS='-DENABLE_EXTRA_ALIGNMENT=OFF' .evergreen/scripts/compile.sh |
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.
Remove reference to no-longer-needed DEBUG
environment variable on line 74:
if config == "debug":
self.compile_sh_opt["DEBUG"] = "ON"
else:
assert config == "release"
self.compile_sh_opt["RELEASE"] = "ON"
Followup to #1524. Verified by this patch.
Addresses the following error on some Windows distros when used with the old
CCache.cmake
module (discovered while testing the C++ Driver; this does not break builds but does impact ccache efficiency):Applies a proper transformation to Windows path form on Windows distros to avoid Windows-side cmake or ccache confusion of file paths.
Additional improvements include:
build
subdirectory as the binary directory for CMake.