How to target ldc compiler only in dub

data pulverizer data.pulverizer at gmail.com
Tue May 26 22:28:14 UTC 2020


Hi,

I am trying to build a package to target LDC compiler only. I 
have both dmd and ldc2 (1.18.0) installed on my system. The dub 
file is:

```
{
	"authors": [
		"Me"
	],
	"copyright": "Copyright © 2020, Me",
	"dependencies": {
		"mir-algorithm": "~>3.8.12",
		"mir-random": "~>2.2.14"
	},
	"description": "Some Cool Stuff",
	"license": "MIT",
	"name": "myPackage",
	"dflags": [
		"-O", "--release", "--boundscheck=off",
		"--ffast-math", "-mcpu=native"],
	"toolchainRequirements": {
		"dmd": "no",
		"gdc": "no",
		"ldc": ">=1.18.0"
	},
	"targetType": "executable"
}
```

I get the message:

```
Installed dmd 2.090.1 is not supported by myPackage. Supported 
compiler(s):
   - ldc: >=1.18.0
```

Thanks


More information about the Digitalmars-d-learn mailing list