July 12, 2014
https://issues.dlang.org/show_bug.cgi?id=13109

          Issue ID: 13109
           Summary: -run and -lib dmd flags conflict
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody@puremagic.com
          Reporter: lio+bugzilla@lunesu.com

dmd -lib -run blah.d

This will create the static library but not actually link/run the binary. On posix this results in an SIGSEGV because the "exefile" variable is NULL.

I suggest to make this an error.

--