-dllimport=defaultLibsOnly: Avoid -linkonce-templates requirement (#3816)

Via a sorts-of '-linkonce-templates light', only defining all *data*
symbols instantiated from druntime/Phobos templates in each
referencing CU.
This commit is contained in:
Martin Kinkelin 2021-09-11 04:53:21 +02:00 committed by GitHub
parent d9b2c936c9
commit 16b9eab374
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 34 deletions

View file

@ -598,7 +598,7 @@ void DtoDeclareFunction(FuncDeclaration *fdecl, const bool willDefine) {
bool defineAsAvailableExternally = false;
if (willDefine) {
// will be defined anyway after declaration
} else if (defineOnDeclare(fdecl)) {
} else if (defineOnDeclare(fdecl, /*isFunction=*/true)) {
Logger::println("Function is inside a linkonce_odr template, will be "
"defined after declaration.");
if (fdecl->semanticRun < PASSsemantic3done) {