forked from mesonbuild/wrapdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSVC needs a way of knowing which symbols are supposed to be exported, otherwise it does not create a DLL. This means the wrap was previously unusable as a shared library. The OpenSSL build process does that by passing a `.def` file to the linker. This reimplements OpenSSL's `util/mkdef.pl` script to make the meson build do the same as the normal build process. Fixes mesonbuild#181.
- Loading branch information
Showing
5 changed files
with
60 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2338,6 +2338,7 @@ | |
"openssl" | ||
], | ||
"versions": [ | ||
"3.0.8-2", | ||
"3.0.8-1", | ||
"3.0.7-2", | ||
"3.0.7-1", | ||
|
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import sys | ||
|
||
EXTRA_CRYPTO = """\ | ||
WPACKET_allocate_bytes | ||
WPACKET_cleanup | ||
WPACKET_close | ||
WPACKET_fill_lengths | ||
WPACKET_finish | ||
WPACKET_get_curr | ||
WPACKET_get_length | ||
WPACKET_get_total_written | ||
WPACKET_init | ||
WPACKET_init_static_len | ||
WPACKET_memcpy | ||
WPACKET_memset | ||
WPACKET_put_bytes__ | ||
WPACKET_reserve_bytes | ||
WPACKET_set_flags | ||
WPACKET_start_sub_packet | ||
WPACKET_start_sub_packet_len__ | ||
WPACKET_sub_allocate_bytes__ | ||
WPACKET_sub_memcpy__ | ||
WPACKET_sub_reserve_bytes__ | ||
ssl3_cbc_digest_record | ||
ssl3_cbc_remove_padding_and_mac | ||
tls1_cbc_remove_padding_and_mac | ||
""".splitlines() | ||
|
||
def main(): | ||
import argparse | ||
p = argparse.ArgumentParser(description="Convert OpenSSL .num files into .def files") | ||
p.add_argument("--fixup-crypto", action="store_true", help="crypto.dll-specific fixups") | ||
args = p.parse_args() | ||
|
||
input = sys.stdin.read() | ||
lines = [line.split() for line in input.splitlines()] | ||
data = [tuple([name, ordinal] + tags.split(":")) for name, ordinal, _, tags in lines] | ||
|
||
print("EXPORTS") | ||
for name, ordinal, exists, system, _, tags, *_ in data: | ||
if exists != "EXIST": | ||
continue | ||
if system and not system.startswith("!"): | ||
continue | ||
if any(tag in "COMP CRYPTO_MDEBUG DGRAM EC_NISTP_64_GCC_128 EGD MD2 RC5 SSL3_METHOD UNIT_TEST".split() for tag in tags.split(",")): | ||
continue | ||
print(" {} @{}".format(name, ordinal)) | ||
if args.fixup_crypto: | ||
for name in EXTRA_CRYPTO: | ||
print(" {}".format(name)) | ||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |
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