diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-10-16 13:12:35 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-10-16 13:12:35 -0400 |
| commit | 10f6176f3dea426d97b19e7d890947b5e07346af (patch) | |
| tree | 6b18007e03fa1c8c1098faa60dda6cbf7a9da4b4 /src/link.cpp | |
| parent | 5bfea3f1ea4b5c81321583af7aa7549e5a81cf3c (diff) | |
| download | zig-10f6176f3dea426d97b19e7d890947b5e07346af.tar.gz zig-10f6176f3dea426d97b19e7d890947b5e07346af.zip | |
only look for .defs when needed; remove samsrv.dll cross compiling support
previously zig would look for all the .defs even when not needed,
wasting time. also, we only had samsrv definitions for some architectures.
remove cross compiling support for this.
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/link.cpp b/src/link.cpp index fbe922c511..abb4ca6193 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -576,7 +576,6 @@ static const MinGWDef mingw_def_list[] = { {"opengl32",false}, {"rpcns4", false}, {"rpcrt4", false}, - {"samsrv", false}, {"scarddlg",false}, {"setupapi",false}, {"shell32", true}, @@ -2184,17 +2183,17 @@ static void add_mingw_link_args(LinkJob *lj, bool is_library) { const char *name = mingw_def_list[def_i].name; const bool always_link = mingw_def_list[def_i].always_link; - Buf lib_path = BUF_INIT; - Error err = find_mingw_lib_def(lj, name, &lib_path); - - if (err == ErrorFileNotFound) { - zig_panic("link: could not find .def file to build %s\n", name); - } else if (err != ErrorNone) { - zig_panic("link: unable to check if .def file for %s exists: %s", - name, err_str(err)); - } - if (always_link || is_linking_system_lib(g, name)) { + Buf lib_path = BUF_INIT; + Error err = find_mingw_lib_def(lj, name, &lib_path); + + if (err == ErrorFileNotFound) { + zig_panic("link: could not find .def file to build %s\n", name); + } else if (err != ErrorNone) { + zig_panic("link: unable to check if .def file for %s exists: %s", + name, err_str(err)); + } + lj->args.append(get_def_lib(g, name, &lib_path)); } } |
