Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Fix paths in build process for shared library builds on Windows #14

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion util/mk1mf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,11 @@
# Build OQS
if ($platform eq "VC-WIN32") {
$vsplatform = "x86";
$vsplatformdir = "Win32";
}
elsif (($platform eq "VC-WIN64A") || ($platform eq "VC-WIN64I")) {
$vsplatform = "x64";
$vsplatformdir = "x64";
}
if ($debug = "1") {
$vsconfig = "Debug";
Expand Down Expand Up @@ -501,7 +503,7 @@
SRC_D=$src_dir

LINK_CMD=$link
LFLAGS=$lflags /libpath:vendor${o}liboqs${o}VisualStudio${o}$vsplatform${o}$vsconfig
LFLAGS=$lflags /libpath:vendor${o}liboqs${o}VisualStudio${o}$vsplatformdir${o}$vsconfig
RSC=$rsc

# The output directory for everything interesting
Expand Down
8 changes: 8 additions & 0 deletions util/pl/VC-32.pl
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@
$lfile='/out:';

$shlib_ex_obj="";
if ($FLAVOR =~ /WIN64A/) {
$shlib_ex_obj='vendor\\liboqs\\VisualStudio\\x64\\Debug\\oqs.lib';
} elsif ($FLAVOR =~ /WIN32/) {
$shlib_ex_obj='vendor\\liboqs\\VisualStudio\\Win32\\Debug\\oqs.lib';
} else {
print "Warning: Unsupported OQS flavor selected. Link step may not succeed!";
}

$app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
if ($FLAVOR =~ /WIN64A/) {
if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
Expand Down