-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
build: external deps build on Windows #3892
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ab10663
Convert external dependencies to cmake / ninja where supported
ajgokhale 2a8c39e
External deps now build on Windows
sesmith177 b1d74d6
Don't change build files
ajgokhale 3c3724e
Glob libevent_pthreads
sesmith177 f80ec45
Add TODO referencing PR
arjun024 daaf5a1
Add comment explaining glob
sesmith177 de70604
Explain Debug builds for external deps on Windows
sesmith177 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,41 @@ set -e | |
# TODO(PiotrSikora): switch back to releases once v1.33.0 is out. | ||
VERSION=e5b3f9addd49bca27e2f99c5c65a564eb5c0cf6d # 2018-06-09 | ||
|
||
wget -O nghttp2-"$VERSION".tar.gz https://github.com/nghttp2/nghttp2/archive/"$VERSION".tar.gz | ||
curl https://github.com/nghttp2/nghttp2/archive/"$VERSION".tar.gz -sLo nghttp2-"$VERSION".tar.gz | ||
tar xf nghttp2-"$VERSION".tar.gz | ||
cd nghttp2-"$VERSION" | ||
autoreconf -i | ||
automake | ||
autoconf | ||
./configure --prefix="$THIRDPARTY_BUILD" --enable-shared=no --enable-lib-only | ||
make V=1 install | ||
|
||
# Allow nghttp2 to build as static lib on Windows | ||
# TODO: remove once https://github.com/nghttp2/nghttp2/pull/1198 is merged | ||
cat > nghttp2_cmakelists.diff << 'EOF' | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index 17e422b2..e58070f5 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -56,6 +56,7 @@ if(HAVE_CUNIT OR ENABLE_STATIC_LIB) | ||
COMPILE_FLAGS "${WARNCFLAGS}" | ||
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} | ||
ARCHIVE_OUTPUT_NAME nghttp2 | ||
+ ARCHIVE_OUTPUT_DIRECTORY static | ||
) | ||
target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB") | ||
if(ENABLE_STATIC_LIB) | ||
EOF | ||
|
||
if [[ "${OS}" == "Windows_NT" ]]; then | ||
git apply nghttp2_cmakelists.diff | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
fi | ||
|
||
mkdir build | ||
cd build | ||
|
||
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX="$THIRDPARTY_BUILD" \ | ||
-DENABLE_STATIC_LIB=on \ | ||
-DENABLE_LIB_ONLY=on \ | ||
.. | ||
ninja | ||
ninja install | ||
|
||
if [[ "${OS}" == "Windows_NT" ]]; then | ||
cp "lib/CMakeFiles/nghttp2_static.dir/nghttp2_static.pdb" "$THIRDPARTY_BUILD/lib/nghttp2_static.pdb" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm wondering if there have been any noticeable changes in performance or build object when switching from the
configure
flags like--enable-optimize
to thebuild_type
here.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.
Using
configure
, it looks like the compiler flags were:using
ninja
, it looks like the compiler flags were:We got these compiler flags by running
objdump --dwarf libcares.a | grep DW_AT_producer
What is the usual way to catch a performance regression?
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 don't have a standardized way to do this. I would flag this in the "Risk level" as medium and point out that there is potential for performance regression. I think it should be fine based on those 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.
Done