Skip to content

Commit dc74954

Browse files
authored
Remove MSVC / ICC specific code (#42703)
Support for building MSVC and ICC was removed from the build system in PR #42586; this patch removes more leftover code which was there to support MSVC / ICC.
1 parent df81a0d commit dc74954

34 files changed

+10
-429
lines changed

THIRDPARTY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ for exceptions.
66
- [crc32c.c](https://stackoverflow.com/questions/17645167/implementing-sse-4-2s-crc32c-in-software) (CRC-32c checksum code by Mark Adler) [[ZLib](https://opensource.org/licenses/Zlib)].
77
- [LDC](https://github.com/ldc-developers/ldc/blob/master/LICENSE) (for ccall/cfunction ABI definitions) [BSD-3]. The portion of code that Julia uses from LDC is [BSD-3] licensed.
88
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/disasm.cpp) [UIUC]
9-
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for src/getopt.c and src/getopt.h) [MIT]
109
- [MINGW](https://sourceforge.net/p/mingw/mingw-org-wsl/ci/legacy/tree/mingwrt/mingwex/dirname.c) (for dirname implementation on Windows) [MIT]
1110
- [NetBSD](https://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3]
1211
- [Python](https://docs.python.org/3/license.html) (for strtod implementation on Windows) [PSF]

contrib/add_license_to_files.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ const skipfiles = [
4646
"../src/abi_x86.cpp",
4747
"../src/abi_x86_64.cpp",
4848
"../src/disasm.cpp",
49-
"../src/getopt.c",
50-
"../src/getopt.h",
5149
"../src/support/END.h",
5250
"../src/support/ENTRY.amd64.h",
5351
"../src/support/ENTRY.i387.h",

src/aotcompile.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,11 @@ namespace llvm {
5858
#include "jitlayers.h"
5959
#include "julia_assert.h"
6060

61-
// MSVC's link.exe requires each function declaration to have a Comdat section
62-
// So rather than litter the code with conditionals,
63-
// all global values that get emitted call this function
64-
// and it decides whether the definition needs a Comdat section and adds the appropriate declaration
6561
template<class T> // for GlobalObject's
6662
static T *addComdat(T *G)
6763
{
6864
#if defined(_OS_WINDOWS_)
6965
if (!G->isDeclaration()) {
70-
// Add comdat information to make MSVC link.exe happy
71-
// it's valid to emit this for ld.exe too,
72-
// but makes it very slow to link for no benefit
73-
#if defined(_COMPILER_MICROSOFT_)
74-
Comdat *jl_Comdat = G->getParent()->getOrInsertComdat(G->getName());
75-
// ELF only supports Comdat::Any
76-
jl_Comdat->setSelectionKind(Comdat::NoDuplicates);
77-
G->setComdat(jl_Comdat);
78-
#endif
7966
// add __declspec(dllexport) to everything marked for export
8067
if (G->getLinkage() == GlobalValue::ExternalLinkage)
8168
G->setDLLStorageClass(GlobalValue::DLLExportStorageClass);

src/ast.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
extern "C" {
2020
#endif
2121

22-
// MSVC complains about "julia_flisp.boot.inc : error C4335: Mac file format
23-
// detected: please convert the source file to either DOS or UNIX format"
24-
#ifdef _MSC_VER
25-
#pragma warning(disable:4335)
26-
#endif
27-
28-
2922
// head symbols for each expression type
3023
JL_DLLEXPORT jl_sym_t *jl_call_sym;
3124
JL_DLLEXPORT jl_sym_t *jl_invoke_sym;

src/ccalltest.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ int c_int = 0;
4040
int xs[300] = {0,0,0,1,0};
4141

4242
//int testUcharX(unsigned char x);
43-
#ifdef _COMPILER_MICROSOFT_
44-
int __declspec(noinline)
45-
#else
4643
int __attribute__((noinline))
47-
#endif
4844
DLLEXPORT testUcharX(unsigned char x) {
4945
return xs[x];
5046
}

src/clangsa/GCChecker.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
#if defined(__GNUC__)
2121
#define USED_FUNC __attribute__((used))
22-
#elif defined(_COMPILER_MICROSOFT_)
23-
// Does MSVC have this?
24-
#define USED_FUNC
2522
#else
2623
#define USED_FUNC
2724
#endif

src/codegen.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ extern void _chkstk(void);
137137
#endif
138138
}
139139

140-
#if defined(_COMPILER_MICROSOFT_) && !defined(__alignof__)
141-
#define __alignof__ __alignof
142-
#endif
143-
144140
// llvm state
145141
extern JITEventListener *CreateJuliaJITEventListener();
146142

src/crc32c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ JL_UNUSED static inline uint32_t crc32c_shift(const uint32_t zeros[][256], uint3
8080
zeros[2][(crc >> 16) & 0xff] ^ zeros[3][crc >> 24];
8181
}
8282

83-
#if (defined(_CPU_X86_64_) || defined(_CPU_X86_)) && !defined(_COMPILER_MICROSOFT_)
83+
#if defined(_CPU_X86_64_) || defined(_CPU_X86_)
8484
# ifdef _CPU_X86_64_
8585
# define CRC32_PTR "crc32q"
8686
# else

src/dlload.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,7 @@ static int endswith_extension(const char *path) JL_NOTSAFEPOINT
5858
}
5959

6060
#ifdef _OS_WINDOWS_
61-
#ifdef _MSC_VER
62-
#if (_MSC_VER >= 1930) || (_MSC_VER < 1800)
63-
#error This version of MSVC has not been tested.
64-
#elif _MSC_VER >= 1900 // VC++ 2015 / 2017 / 2019
65-
#define CRTDLL_BASENAME "vcruntime140"
66-
#elif _MSC_VER >= 1800 // VC++ 2013
67-
#define CRTDLL_BASENAME "msvcr120"
68-
#endif
69-
#else
7061
#define CRTDLL_BASENAME "msvcrt"
71-
#endif
7262

7363
JL_DLLEXPORT const char *jl_crtdll_basename = CRTDLL_BASENAME;
7464
const char *jl_crtdll_name = CRTDLL_BASENAME ".dll";

src/dump.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616
#include <dlfcn.h>
1717
#endif
1818

19-
#ifndef _COMPILER_MICROSOFT_
2019
#include "valgrind.h"
21-
#else
22-
#define RUNNING_ON_VALGRIND 0
23-
#endif
2420
#include "julia_assert.h"
2521

2622
#ifdef __cplusplus

0 commit comments

Comments
 (0)