Build OpenSSL from sources using the Perl executable specified.
(
entry: str,
perl_path: pathlib.Path,
arch: str,
dest_archive: pathlib.Path,
with_uplink: bool = False,
)
| 890 | |
| 891 | |
| 892 | def build_openssl( |
| 893 | entry: str, |
| 894 | perl_path: pathlib.Path, |
| 895 | arch: str, |
| 896 | dest_archive: pathlib.Path, |
| 897 | with_uplink: bool = False, |
| 898 | ): |
| 899 | """Build OpenSSL from sources using the Perl executable specified.""" |
| 900 | |
| 901 | openssl_version = DOWNLOADS[entry]["version"] |
| 902 | |
| 903 | # First ensure the dependencies are in place. |
| 904 | openssl_archive = download_entry(entry, BUILD) |
| 905 | nasm_archive = download_entry("nasm-windows-bin", BUILD) |
| 906 | jom_archive = download_entry("jom-windows-bin", BUILD) |
| 907 | |
| 908 | with tempfile.TemporaryDirectory(prefix="openssl-build-") as td: |
| 909 | td = pathlib.Path(td) |
| 910 | |
| 911 | root_32 = td / "x86" |
| 912 | root_64 = td / "x64" |
| 913 | root_arm64 = td / "arm64" |
| 914 | |
| 915 | if arch == "x86": |
| 916 | root_32.mkdir() |
| 917 | build_openssl_for_arch( |
| 918 | perl_path, |
| 919 | "x86", |
| 920 | openssl_archive, |
| 921 | openssl_version, |
| 922 | nasm_archive, |
| 923 | root_32, |
| 924 | jom_archive=jom_archive, |
| 925 | with_uplink=with_uplink, |
| 926 | ) |
| 927 | elif arch == "amd64": |
| 928 | root_64.mkdir() |
| 929 | build_openssl_for_arch( |
| 930 | perl_path, |
| 931 | "amd64", |
| 932 | openssl_archive, |
| 933 | openssl_version, |
| 934 | nasm_archive, |
| 935 | root_64, |
| 936 | jom_archive=jom_archive, |
| 937 | with_uplink=with_uplink, |
| 938 | ) |
| 939 | elif arch == "arm64": |
| 940 | root_arm64.mkdir() |
| 941 | build_openssl_for_arch( |
| 942 | perl_path, |
| 943 | "arm64", |
| 944 | openssl_archive, |
| 945 | openssl_version, |
| 946 | nasm_archive, |
| 947 | root_arm64, |
| 948 | jom_archive=jom_archive, |
| 949 | with_uplink=with_uplink, |
no test coverage detected