Skip to content

Commit

Permalink
Remove all references to OMF
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed May 9, 2024
1 parent 17cf2ad commit 163acb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
10 changes: 3 additions & 7 deletions create_dmd_release/build_all.d
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,14 @@ string getDubTag(bool preRelease)
import std.json : parseJSON, JSONValue;

// github already sorts tags in descending semantic versioning order
foreach (tag; get("https://api.github.com/repos/dlang/dub/tags").parseJSON.array.ifThrown(JSONValue[].init))
foreach (tag; get("https://api.github.com/repos/ibuclaw/dub/tags").parseJSON.array.ifThrown(JSONValue[].init))
if (auto m = tag["name"].str.match(versionRE))
if (preRelease || m.captures[4].empty)
return tag["name"].str;

// Fallback: Use git ls-remote to list all known tags and sort them appropriatly
auto re = regex(`v(\d+)\.(\d+)\.(\d+)(-[^\^]*)?$`);
auto tagList = runCapture("git ls-remote --tags https://github.com/dlang/dub.git")
auto tagList = runCapture("git ls-remote --tags https://github.com/ibuclaw/dub.git")
.lineSplitter
.map!(t => t.match(re))
.filter!(m => !m.empty && (preRelease || m.captures[4].empty))
Expand Down Expand Up @@ -442,7 +442,7 @@ void getCodesignCerts(string tgtDir)

void cloneSources(string gitTag, string dubTag, bool isBranch, bool skipDocs, string tgtDir)
{
auto prefix = "https://github.com/dlang/";
auto prefix = "https://github.com/ibuclaw/";
auto fmt = "git clone --depth 1 --branch %1$s " ~ prefix ~ "%2$s.git " ~ tgtDir ~ "/%2$s";
size_t nfallback;
foreach (proj; allProjects)
Expand Down Expand Up @@ -577,7 +577,6 @@ int main(string[] args)
enum optlink = "optlink.zip";
enum libC = "snn.lib";
enum libCurl = "libcurl-7.68.0-WinSSL-zlib-x86-x64.zip";
enum omflibs = "omflibs-winsdk-10.0.16299.15.zip";
enum mingwtag = "mingw-libs-8.0.0";
enum mingwlibs = mingwtag ~ ".zip"; enum mingw_sha = hexString!"8c1619234ca8370b742a08a30b13bf9bdb333f842ed0ea02cafe9054c68adc97";
enum lld = "lld-link-9.0.0-seh.zip"; enum lld_sha = hexString!"ffde2eb0e0410e6985bbbb44c200b21a2b2dd34d3f8c3411f5ca5beb7f67ba5b";
Expand All @@ -603,7 +602,6 @@ int main(string[] args)
fetchFile("http://ftp.digitalmars.com/"~optlink, cacheDir~"/"~optlink);
fetchFile("http://ftp.digitalmars.com/"~libC, cacheDir~"/"~libC);
fetchFile("https://downloads.dlang.org/other/"~libCurl, cacheDir~"/"~libCurl, verifySignature);
fetchFile("https://downloads.dlang.org/other/"~omflibs, cacheDir~"/"~omflibs, verifySignature);
fetchFile("https://downloads.dlang.org/other/"~lld, cacheDir~"/"~lld, verifySignature, lld_sha);
fetchFile("https://downloads.dlang.org/other/"~lld64, cacheDir~"/"~lld64, verifySignature, lld64_sha);
fetchFile("https://github.com/dlang/installer/releases/download/"~mingwtag~"/"~mingwlibs, cacheDir~"/"~mingwlibs, verifySignature, mingw_sha);
Expand Down Expand Up @@ -638,8 +636,6 @@ int main(string[] args)
copyFile(cacheDir~"/"~libC, workDir~"/windows/extraBins/dmd2/windows/lib/"~libC);
// add libcurl build for windows
extract(cacheDir~"/"~libCurl, workDir~"/windows/extraBins/");
// add updated OMF import libraries
extract(cacheDir~"/"~omflibs, workDir~"/windows/extraBins/dmd2/windows/lib/");
// add mingw coff libraries
extract(cacheDir~"/"~mingwlibs, workDir~"/windows/extraBins/");
// add lld linker
Expand Down
20 changes: 0 additions & 20 deletions create_dmd_release/create_dmd_release.d
Original file line number Diff line number Diff line change
Expand Up @@ -373,23 +373,6 @@ void buildAll(Bits bits, string branch)
changeDir(cloneDir~"/phobos");
run(msvcVars~makecmd~pic);

version(Windows) if (is32)
{
const makecmd_omf = makecmd.replace(makeModel, " MODEL=32omf");

info("Building Druntime 32omf");
changeDir(cloneDir~"/dmd/druntime");
run(makecmd_omf);

info("Building OMF import libraries");
changeDir(cloneDir~"/dmd/druntime/def");
run(make~jobs);

info("Building Phobos 32omf");
changeDir(cloneDir~"/phobos");
run(makecmd_omf);
}

// Build docs
if(!skipDocs)
{
Expand Down Expand Up @@ -497,9 +480,6 @@ void createRelease(string branch)
if(do32Bit)
{
copyFile(cloneDir~"/phobos/phobos32mscoff.lib", osDir~"/lib32mscoff/phobos32mscoff.lib");
// OMF:
copyFile(cloneDir~"/phobos/phobos.lib", osDir~"/lib/phobos.lib");
copyDir(cloneDir~"/dmd/druntime/def/", osDir~"/lib/", file => file.endsWith(".lib"));
}
if(do64Bit)
{
Expand Down
2 changes: 1 addition & 1 deletion test/release/validate_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ "$OS" == "windows" ]
then
7z x -y $BUILD -o"$GEN/"

TARGETS="-m32 -m32mscoff -m32omf -m64"
TARGETS="-m32 -m32mscoff -m64"
EXE=".exe"
else
tar xf $BUILD --directory="$GEN/"
Expand Down

0 comments on commit 163acb6

Please sign in to comment.