mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
runtime: sprinkle some linker pragmas to autolink
This prepares the runtime to be closed with its dependencies when performing static linking. The pragma ensures that the linker will automatically pick up the dependent libraries avoiding the need to explicitly add the dependencies.
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
|
||||
#pragma comment(lib, "User32.Lib")
|
||||
|
||||
#include <mutex>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
#include <DbgHelp.h>
|
||||
|
||||
#pragma comment(lib, "DbgHelp.Lib")
|
||||
#endif
|
||||
|
||||
#include "swift/Runtime/Win32.h"
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <Windows.h>
|
||||
#include <DbgHelp.h>
|
||||
#include <psapi.h>
|
||||
|
||||
#pragma comment(lib, "DbgHelp.Lib")
|
||||
|
||||
#elif SWIFT_STDLIB_HAS_DLADDR
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user