Comments (3)
Please try this patch:
From 0b0c1d5e1973da30910a52f88022f79479fca7dc Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <[email protected]>
Date: Sun, 30 Apr 2023 06:25:17 +0000
Subject: [PATCH] rdmd: Support -shared in the same way as -lib
---
rdmd.d | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/rdmd.d b/rdmd.d
index d02cacc..5eeb373 100755
--- a/rdmd.d
+++ b/rdmd.d
@@ -27,6 +27,7 @@ version (Posix)
enum objExt = ".o";
enum binExt = "";
enum libExt = ".a";
+ enum dllExt = ".so";
enum altDirSeparator = "";
}
else version (Windows)
@@ -34,6 +35,7 @@ else version (Windows)
enum objExt = ".obj";
enum binExt = ".exe";
enum libExt = ".lib";
+ enum dllExt = ".dll";
enum altDirSeparator = "/";
}
else
@@ -242,10 +244,15 @@ int main(string[] args)
bool obj = compilerFlags.canFind("-c");
bool lib = compilerFlags.canFind("-lib");
- string outExt = lib ? libExt : obj ? objExt : binExt;
+ bool dll = compilerFlags.canFind("-shared");
+ string outExt =
+ dll ? dllExt :
+ lib ? libExt :
+ obj ? objExt :
+ binExt;
- // Assume --build-only for -c and -lib.
- buildOnly |= obj || lib;
+ // Assume --build-only for -c / -lib / -shared.
+ buildOnly |= obj || lib || dll;
// --build-only implies the user would like a binary in the program's directory
if (buildOnly && !exe.ptr)
@@ -360,7 +367,7 @@ size_t indexOfProgram(string[] args)
{
auto arg = args[i];
if (!arg.startsWith('-', '@') &&
- !arg.endsWith(".obj", ".o", ".lib", ".a", ".def", ".map", ".res") &&
+ !arg.endsWith(".obj", ".o", ".lib", ".a", ".dll", ".so", ".def", ".map", ".res") &&
args[i - 1] != "--eval")
{
return i;
--
2.40.0
from tools.
Seems to do the trick!
@CyberShadow could you PR this?
from tools.
OK, here it is: #458
from tools.
Related Issues (20)
- changed: Link to the PR that introduced a new feature
- rdmd makes too many stat() calls, of which many are not traced
- rdmd file-descriptor issues with snap packages
- Rename dman in the Debian .deb package to prevent conflict with Debian package debian-goodies HOT 2
- rdmd should limit its tmp cache
- rdmd runs dmd twice for single-files with no dependencies
- `rdmd -deps=foo.deps foo.d` caching misses dependency on foo.deps
- dumpobj, obj2asm, shell should be built for 64 bit
- rdmd --exclude= --include= should allow passing in modules (not just packages)
- rdmd ignores --exclude when -deps is provided
- rdmd does not discover all dependencies
- rdmd doesn't respect DFLAGS for its cache hash
- coffimplib silently overwrites a library with a mixed-case extension
- obj2asm thinks / starts a switch on non-Windows systems
- `rdmd -g --build-only` implicitly looses debug info
- rdmd should compile package at a time
- RDMD: -g switch produces linker error
- rdmd on windows can't run files with "setup" or "install" in the name HOT 2
- rdmd doesn't handle piping or unix-isms HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tools.