Skip to content
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

[openssl] Support custom cflags on Windows #24133

Merged
merged 6 commits into from
May 17, 2022

Conversation

ras0219-msft
Copy link
Contributor

This PR enables custom CFLAGS, ARFLAGS, and LDFLAGS to be passed to Openssl's build on Windows (for example: CFG and Spectre-mitigations).

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 99346bb6926e85d93e4aad330bf28cce4a18051b -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index cb140f1..4695591 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5154,7 +5154,7 @@
     },
     "openssl": {
       "baseline": "3.0.2",
-      "port-version": 2
+      "port-version": 3
     },
     "openssl-unix": {
       "baseline": "1.1.1h",
diff --git a/versions/o-/openssl.json b/versions/o-/openssl.json
index 207c896..a1ef951 100644
--- a/versions/o-/openssl.json
+++ b/versions/o-/openssl.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "65054babd2e2516e892e929c8761165a59850751",
+      "version": "3.0.2",
+      "port-version": 3
+    },
     {
       "git-tree": "66e7ff434d21a4fc00cab9bbe6167db295ffefd3",
       "version": "3.0.2",

@ras0219-msft ras0219-msft force-pushed the dev/roschuma/openssl branch from aa3d6c6 to b1238f5 Compare April 13, 2022 23:18
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 99346bb6926e85d93e4aad330bf28cce4a18051b -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index cb140f1..4695591 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5154,7 +5154,7 @@
     },
     "openssl": {
       "baseline": "3.0.2",
-      "port-version": 2
+      "port-version": 3
     },
     "openssl-unix": {
       "baseline": "1.1.1h",
diff --git a/versions/o-/openssl.json b/versions/o-/openssl.json
index 207c896..18641f0 100644
--- a/versions/o-/openssl.json
+++ b/versions/o-/openssl.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "1237f47607ad00a8387cef4d78879ff7acd6c7af",
+      "version": "3.0.2",
+      "port-version": 3
+    },
     {
       "git-tree": "66e7ff434d21a4fc00cab9bbe6167db295ffefd3",
       "version": "3.0.2",

@ras0219-msft ras0219-msft force-pushed the dev/roschuma/openssl branch from b1238f5 to 8f2244c Compare April 14, 2022 01:55
@JackBoosY JackBoosY added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:internal This PR or Issue was filed by the vcpkg team. labels Apr 14, 2022
@JackBoosY JackBoosY self-assigned this Apr 14, 2022
set(ENV{LD} "${VCPKG_DETECTED_CMAKE_LINKER}")

# OpenSSL's buildsystem hardcodes certain PDB manipulations, so we cannot use Z7
string(REGEX REPLACE "(^| )-Z7($| )" " " VCPKG_COMBINED_C_FLAGS_RELEASE "${VCPKG_COMBINED_C_FLAGS_RELEASE}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string(REGEX REPLACE "(^| )-Z7($| )" " " VCPKG_COMBINED_C_FLAGS_RELEASE "${VCPKG_COMBINED_C_FLAGS_RELEASE}")

Fun fact: The reason I did use " " instead of "${CMAKE_MATCH_<N>}" is because I didn't bother finding out which one is the correct N. I assume it is 2 but I didn't want to build ffmpeg (and all its dependencies) locally to figure out if it is correct.

@ras0219-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ras0219-msft ras0219-msft marked this pull request as ready for review April 26, 2022 20:00
@ras0219-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JackBoosY
Copy link
Contributor

Seems good now?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

Error: Local changes detected for openssl but no changes to version or port version.
-- Version: 3.0.3#1
-- Old SHA: 13d089c0d416018d6e60a25fe68794561d2b1dd5
-- New SHA: 2024765c9acae15fb1e091fd939353c533847136
-- Did you remember to update the version or port version?
-- Pass `--overwrite-version` to bypass this check.
***No files were updated.***

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for openssl have changed but the version was not updated
version: 3.0.3#1
old SHA: 13d089c0d416018d6e60a25fe68794561d2b1dd5
new SHA: 2024765c9acae15fb1e091fd939353c533847136
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

@ras0219-msft ras0219-msft force-pushed the dev/roschuma/openssl branch from 4069322 to 10e29ed Compare May 16, 2022 18:49
@BillyONeal BillyONeal merged commit 6105887 into microsoft:master May 17, 2022
@BillyONeal
Copy link
Member

Thanks for the fix!

@ras0219-msft ras0219-msft deleted the dev/roschuma/openssl branch August 4, 2022 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants