Skip to content

Commit 5cbf841

Browse files
committed
ldc-build-runtime: Bail out when using a non-empty --installWithSuffix without also setting RT_CONF_TRIPLE_REGEX or CONF_INST_DIR
1 parent ac39b9d commit 5cbf841

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/ldc-build-runtime.d.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ void runCMake() {
173173
];
174174

175175
if (config.installWithSuffix.length) {
176+
if ("RT_CONF_TRIPLE_REGEX" !in config.cmakeVars &&
177+
config.cmakeVars.get("CONF_INST_DIR", "unset") != "") {
178+
writeln(".: Error: when using a non-empty `--installWithSuffix`, either set the RT_CONF_TRIPLE_REGEX CMake variable, or disable installing the .conf file by setting CONF_INST_DIR to an empty string");
179+
exit(1);
180+
}
181+
176182
string confSuffix = config.installWithSuffix;
177183
if (confSuffix[0] == '-')
178184
confSuffix = confSuffix[1 .. $];

0 commit comments

Comments
 (0)