-
-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Description
The following code
int main(string[] a) {
switch (a[0]) {
case "one":
return 1;
case "two":
return 2;
case "three":
return 3;
case "four":
return 4;
case "five":
return 5;
case "six":
return 6;
case "seven":
return 7;
default:
return 0;
}
}
when compiled with these options:
ldc2 -enable-inlining --enable-cross-module-inlining=true -Isource source\main.d -ofd-test.exe -link-internally
results in the following error:
lld-link: error: undefined symbol: _D4core8internal7switch___T8__switchTyaVxAyaa3_6f6e65VxQoa3_736978VxQBba3_74776fVxQBpa4_66697665VxQCfa4_666f7572VxQCva5_736576656eVxQDna5_7468726565ZQEsFNaNbNiNfMxQEsZ5casesyG7Aa
>>> referenced by d-test.obj:(_D4core8internal7switch___T8__switchTyaVxAyaa3_6f6e65VxQoa3_736978VxQBba3_74776fVxQBpa4_66697665VxQCfa4_666f7572VxQCva5_736576656eVxQDna5_7468726565ZQEsFNaNbNiNfMxQEsZi)
Error: linking with LLD failed
The identifier in question is defined in druntime here.
Tested on Windows 10 with LDC 1.40.0.
Metadata
Metadata
Assignees
Labels
No labels