forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt DMD's MSVC toolchain detection
This reduces the overhead for auto-detecting and setting up an MSVC toolchain from a very rough 1 second to about 8 milliseconds on my box. Enabling the auto-detection by default (and so preferring MSVC over the 'internal' toolchain if there's a Visual C++ installation) is now possible, fixing issues like ldc-developers#3402. The MSVC setup now consists of the bare minimum - prepending 3 directories to the LIB env var and 1-2 directories to PATH.
- Loading branch information
Showing
13 changed files
with
244 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
/* Compiler implementation of the D programming language | ||
* Copyright (C) 2009-2020 by The D Language Foundation, All Rights Reserved | ||
* written by Walter Bright | ||
* http://www.digitalmars.com | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* http://www.boost.org/LICENSE_1_0.txt | ||
* https://github.com/dlang/dmd/blob/master/src/dmd/vsoptions.h | ||
*/ | ||
|
||
#pragma once | ||
|
||
#ifdef _WIN32 | ||
|
||
struct VSOptions | ||
{ | ||
const char *WindowsSdkDir = nullptr; | ||
const char *WindowsSdkVersion = nullptr; | ||
const char *UCRTSdkDir = nullptr; | ||
const char *UCRTVersion = nullptr; | ||
const char *VSInstallDir = nullptr; | ||
const char *VCInstallDir = nullptr; | ||
const char *VCToolsInstallDir = nullptr; // used by VS 2017+ | ||
|
||
void initialize(); | ||
const char *getVCBinDir(bool x64, const char *&addpath) const; | ||
const char *getVCLibDir(bool x64) const; | ||
const char *getUCRTLibPath(bool x64) const; | ||
const char *getSDKLibPath(bool x64) const; | ||
}; | ||
|
||
#endif // _WIN32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.