Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dlang/dub
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.38.0
Choose a base ref
...
head repository: dlang/dub
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.38.1
Choose a head ref
  • 6 commits
  • 8 files changed
  • 2 contributors

Commits on Jun 3, 2024

  1. Remove support for OMF, make MsCOFF be x86

    Now that OMF support is being removed, dmd-latest is broken in the CI.
    Since DMD no longer supports it, and we are mostly concerned about
    supporting the latest 10 releases, we're keeping x86_omf and x86_mscoff
    available but making them aliases to x86.
    Geod24 authored and dlang-bot committed Jun 3, 2024
    Copy the full SHA
    270c8a3 View commit details

Commits on Jun 15, 2024

  1. update version to v1.38.1-rc.1

    ibuclaw committed Jun 15, 2024
    Copy the full SHA
    efdbbd5 View commit details

Commits on Jun 22, 2024

  1. Copy the full SHA
    5ed4cad View commit details
  2. Upgrade CI configuration following macOS-11 deprecation

    macOS-11 is going away at the end of June.
    As a consequence, we upgrade to macOS-12, upgrade the supported
    frontend versions, and add some arm64 tests to prepare for
    future upgrades.
    Geod24 committed Jun 22, 2024
    Copy the full SHA
    1475c5a View commit details

Commits on Jun 23, 2024

  1. Drop support for LDC v1.26.0

    We only support the last 10 versions, so LDC should have been upgraded in the previous PR.
    In addition, we can remove a superfluous __VERSION__ statement, which haseen superfluous
    for quite a while now.
    Geod24 committed Jun 23, 2024
    Copy the full SHA
    accdd55 View commit details

Commits on Jun 30, 2024

  1. update version to v1.38.1

    ibuclaw committed Jun 30, 2024
    Copy the full SHA
    fbf3c17 View commit details
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ jobs:
fail-fast: false
matrix:
# Latest stable version, update at will
os: [ macOS-11, ubuntu-20.04, windows-2019 ]
os: [ macOS-12, ubuntu-20.04, windows-2019 ]
dc:
# Always test latest as that is what we use to compile on release
- dmd-latest
@@ -61,10 +61,10 @@ jobs:
- dmd-master
- ldc-master
# Test some intermediate versions
- ldc-1.26.0
- dmd-2.098.1
- dmd-2.101.1
- dmd-2.104.2
- ldc-1.29.0
- dmd-2.099.1
- dmd-2.102.2
- dmd-2.105.3
include:
- { do_test: false }
- { dc: dmd-latest, do_test: true }
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -14,10 +14,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macOS-11, ubuntu-20.04, windows-2019 ]
os: [ macOS-12, ubuntu-20.04, windows-2019 ]
arch: [ x86_64 ]
include:
- { os: windows-2019, arch: i686 }
- { os: macOS-latest, arch: arm64 }

runs-on: ${{ matrix.os }}
steps:
@@ -48,7 +49,7 @@ jobs:
env:
GITVER: ${{ github.event.release.tag_name }}
DMD: "ldmd2"
ARCH_TRIPLE: ${{ matrix.arch }}-${{ runner.os == 'linux' && 'pc-linux' || 'apple-darwin' }}
ARCH_TRIPLE: ${{ matrix.arch }}-${{ runner.os == 'linux' && 'pc-linux' || 'apple-darwin' }}
run: |
ldc2 -run ./build.d -release -mtriple=${ARCH_TRIPLE}
pushd bin
3 changes: 1 addition & 2 deletions source/app.d
Original file line number Diff line number Diff line change
@@ -32,8 +32,7 @@ version (DigitalMars) version (D_Coverage)
*
* https://dlang.org/changelog/2.087.0.html#gc_parallel
*/
static if (__VERSION__ >= 2087)
extern(C) __gshared string[] rt_options = [ "gcopt=parallel:0" ];
extern(C) __gshared string[] rt_options = [ "gcopt=parallel:0" ];

int main(string[] args)
{
55 changes: 5 additions & 50 deletions source/dub/compilers/dmd.d
Original file line number Diff line number Diff line change
@@ -128,46 +128,14 @@ config /etc/dmd.conf
arch_override
);

/// Replace architecture string in `bp.architecture`
void replaceArch(const string from, const string to)
{
const idx = bp.architecture.countUntil(from);
if (idx != -1)
bp.architecture[idx] = to;
}

// DMD 2.099 changed the default for -m32 from OMF to MsCOFF
const m32IsCoff = bp.frontendVersion >= 2_099;

switch (arch_override) {
default: throw new UnsupportedArchitectureException(arch_override);
case "": break;
case "x86": arch_flags = ["-m32"]; break;
// DMD 2.099 made MsCOFF the default, and DMD v2.109 removed OMF
// support. Default everything to MsCOFF, people wanting to use OMF
// should use an older DMD / dub.
case "x86", "x86_omf", "x86_mscoff": arch_flags = ["-m32"]; break;
case "x86_64": arch_flags = ["-m64"]; break;

case "x86_omf":
if (m32IsCoff)
{
arch_flags = [ "-m32omf" ];
replaceArch("x86_mscoff", "x86_omf"); // Probe used the wrong default
}
else // -m32 is OMF
{
arch_flags = [ "-m32" ];
}
break;

case "x86_mscoff":
if (m32IsCoff)
{
arch_flags = [ "-m32" ];
}
else // -m32 is OMF
{
arch_flags = [ "-m32mscoff" ];
replaceArch("x86_omf", "x86_mscoff"); // Probe used the wrong default
}
break;
}
settings.addDFlags(arch_flags);

@@ -181,33 +149,22 @@ config /etc/dmd.conf
auto bp = compiler.determinePlatform(settings, "dmd", "x86");
assert(bp.isWindows());
assert(bp.architecture.canFind("x86"));
const defaultOMF = (bp.frontendVersion < 2_099);
assert(bp.architecture.canFind("x86_omf") == defaultOMF);
assert(bp.architecture.canFind("x86_mscoff") != defaultOMF);
settings = BuildSettings.init;
bp = compiler.determinePlatform(settings, "dmd", "x86_omf");
assert(bp.isWindows());
assert(bp.architecture.canFind("x86"));
assert(bp.architecture.canFind("x86_omf"));
assert(!bp.architecture.canFind("x86_mscoff"));
settings = BuildSettings.init;
bp = compiler.determinePlatform(settings, "dmd", "x86_mscoff");
assert(bp.isWindows());
assert(bp.architecture.canFind("x86"));
assert(!bp.architecture.canFind("x86_omf"));
assert(bp.architecture.canFind("x86_mscoff"));
settings = BuildSettings.init;
bp = compiler.determinePlatform(settings, "dmd", "x86_64");
assert(bp.isWindows());
assert(bp.architecture.canFind("x86_64"));
assert(!bp.architecture.canFind("x86"));
assert(!bp.architecture.canFind("x86_omf"));
assert(!bp.architecture.canFind("x86_mscoff"));
settings = BuildSettings.init;
bp = compiler.determinePlatform(settings, "dmd", "");
if (!isWow64.isNull && !isWow64.get) assert(bp.architecture.canFind("x86"));
if (!isWow64.isNull && !isWow64.get) assert(bp.architecture.canFind("x86_mscoff"));
if (!isWow64.isNull && !isWow64.get) assert(!bp.architecture.canFind("x86_omf"));
if (!isWow64.isNull && isWow64.get) assert(bp.architecture.canFind("x86_64"));
}

@@ -218,11 +175,9 @@ config /etc/dmd.conf
auto compiler = new DMDCompiler;
auto bp = compiler.determinePlatform(settings, "ldmd2", "x86");
assert(bp.architecture.canFind("x86"), bp.architecture.to!string);
assert(!bp.architecture.canFind("x86_omf"), bp.architecture.to!string);
bp = compiler.determinePlatform(settings, "ldmd2", "");
version (X86) assert(bp.architecture.canFind("x86"), bp.architecture.to!string);
version (X86_64) assert(bp.architecture.canFind("x86_64"), bp.architecture.to!string);
assert(!bp.architecture.canFind("x86_omf"), bp.architecture.to!string);
}

void prepareBuildSettings(ref BuildSettings settings, const scope ref BuildPlatform platform,
@@ -433,7 +388,7 @@ config /etc/dmd.conf
static bool isLinkerDFlag(string arg)
{
switch (arg) {
case "-g", "-gc", "-m32", "-m64", "-shared", "-lib", "-m32omf", "-m32mscoff", "-betterC":
case "-g", "-gc", "-m32", "-m64", "-shared", "-lib", "-betterC":
return true;
default:
return arg.startsWith("-L")
2 changes: 1 addition & 1 deletion source/dub/version_.d
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module dub.version_;
enum dubVersion = "v1.38.0";
enum dubVersion = "v1.38.1";
1 change: 1 addition & 0 deletions test/issue2377-dynLib-dep-extra-files/parent/dub.sdl
Original file line number Diff line number Diff line change
@@ -25,4 +25,5 @@ configuration "exe_dynamic" {
subConfiguration "dep1" "dynlib"
dflags "-link-defaultlib-shared" platform="ldc"
dflags "-defaultlib=libphobos2.so" platform="linux-dmd"
lflags "-rpath" "@executable_path" platform="osx"
}
11 changes: 1 addition & 10 deletions test/win32_default.d
Original file line number Diff line number Diff line change
@@ -5,10 +5,6 @@
"name": "Default",
"versions": [ "Default" ]
},
{
"name": "OMF",
"versions": [ "OMF" ]
},
{
"name": "MsCoff",
"versions": [ "MsCoff" ]
@@ -25,12 +21,7 @@ module dynlib.app;
pragma(msg, "Frontend: ", __VERSION__);

// Object format should match the expectation
version (OMF)
{
enum expSize = 4;
enum expFormat = "omf";
}
else version (MsCoff)
version (MsCoff)
{
// Should be a 32 bit build
version (Is64) enum expSize = 8;
2 changes: 1 addition & 1 deletion test/win32_default.script.d
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ int main()
// Test with different --arch
const string[2][] tests = [
[ "x86", "Default" ],
[ "x86_omf", "OMF" ],
[ "x86_omf", "MsCoff" ],
[ "x86_mscoff", "MsCoff" ],
[ "x86_64", "MsCoff64" ],
];