Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lld/COFF/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,13 @@ void LinkerDriver::addWinSysRootLibSearchPaths() {
path))
searchPaths.push_back(saver().save(path));
}

// Libraries specified by `/nodefaultlib:` may not be found in incomplete
// search paths before lld infers a machine type from input files.
std::set<std::string> noDefaultLibs;
for (const std::string &path : ctx.config.noDefaultLibs)
noDefaultLibs.insert(findLib(path).lower());
ctx.config.noDefaultLibs = noDefaultLibs;
}

// Parses LIB environment which contains a list of search paths.
Expand Down
1 change: 1 addition & 0 deletions lld/COFF/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ def fastfail : F<"fastfail">;
def kernel : F<"kernel">;
def pdbcompress : F<"pdbcompress">;
def emitpogophaseinfo : F<"emitpogophaseinfo">;
def noexp : F<"noexp">;

def delay : P_priv<"delay">;
def errorreport : P_priv<"errorreport">;
Expand Down