mirror of
https://github.com/janet-lang/janet
synced 2025-02-09 05:20:03 +00:00
Use /MD on windows.
Just makes things easier. Assume machines have msvcrt.dll on them. If not, we can add msvcrt.dll to the dist folder and add to installer.
This commit is contained in:
parent
135abff100
commit
c9292ef648
@ -116,14 +116,14 @@
|
|||||||
(def default-lflags (if is-win ["/nologo"] []))
|
(def default-lflags (if is-win ["/nologo"] []))
|
||||||
(def default-cflags
|
(def default-cflags
|
||||||
(if is-win
|
(if is-win
|
||||||
["/nologo"]
|
["/nologo" "/MD"]
|
||||||
["-std=c99" "-Wall" "-Wextra"]))
|
["-std=c99" "-Wall" "-Wextra"]))
|
||||||
|
|
||||||
# Required flags for dynamic libraries. These
|
# Required flags for dynamic libraries. These
|
||||||
# are used no matter what for dynamic libraries.
|
# are used no matter what for dynamic libraries.
|
||||||
(def- dynamic-cflags
|
(def- dynamic-cflags
|
||||||
(if is-win
|
(if is-win
|
||||||
[]
|
["/LD"]
|
||||||
["-fPIC"]))
|
["-fPIC"]))
|
||||||
(def- dynamic-lflags
|
(def- dynamic-lflags
|
||||||
(if is-win
|
(if is-win
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
@rem Set compile and link options here
|
@rem Set compile and link options here
|
||||||
@setlocal
|
@setlocal
|
||||||
@set JANET_COMPILE=cl /nologo /Isrc\include /Isrc\conf /c /O2 /W3 /D_CRT_SECURE_NO_WARNINGS
|
@set JANET_COMPILE=cl /nologo /Isrc\include /Isrc\conf /c /O2 /W3 /D_CRT_SECURE_NO_WARNINGS /MD
|
||||||
@set JANET_LINK=link /nologo
|
@set JANET_LINK=link /nologo
|
||||||
@set JANET_LINK_STATIC=lib /nologo
|
@set JANET_LINK_STATIC=lib /nologo
|
||||||
|
|
||||||
|
@ -46,25 +46,6 @@ int main(int argc, char **argv) {
|
|||||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||||
SetConsoleMode(hOut, dwMode);
|
SetConsoleMode(hOut, dwMode);
|
||||||
SetConsoleOutputCP(65001);
|
SetConsoleOutputCP(65001);
|
||||||
|
|
||||||
/* Add directory containing janet.exe as DLL search path for
|
|
||||||
dynamic modules on windows. This is needed because dynamic modules reference
|
|
||||||
janet.exe for symbols. Otherwise, janet.exe would have to be in the current directory
|
|
||||||
to load natives correctly. */
|
|
||||||
#ifndef JANET_NO_DYNAMIC_MODULES
|
|
||||||
{
|
|
||||||
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_USER_DIRS);
|
|
||||||
HMODULE hModule = GetModuleHandleW(NULL);
|
|
||||||
wchar_t path[MAX_PATH];
|
|
||||||
GetModuleFileNameW(hModule, path, MAX_PATH);
|
|
||||||
size_t i = wcsnlen(path, MAX_PATH);
|
|
||||||
while (i > 0 && path[i] != '\\')
|
|
||||||
path[i--] = '\0';
|
|
||||||
if (i) AddDllDirectory(path);
|
|
||||||
GetCurrentDirectoryW(MAX_PATH, path);
|
|
||||||
AddDllDirectory(path);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set up VM */
|
/* Set up VM */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user