-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcygwin2macos.cpp
More file actions
71 lines (60 loc) · 2.17 KB
/
cygwin2macos.cpp
File metadata and controls
71 lines (60 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
void configure(Solution &b)
{
auto &s = b.addCustomSolution();
s.Settings.TargetOS.Type = OSType::Macos;
s.Settings.Native.CompilerType = CompilerType::GNU;
{
{
auto Librarian = std::make_shared<GNULibrarian>();
Librarian->Type = LinkerType::GNU;
Librarian->file = "x86_64-apple-darwin15-ar";
Librarian->Extension = s.Settings.TargetOS.getStaticLibraryExtension();
s.registerProgram("org.gnu.binutils.ar", Librarian);
}
{
NativeLinkerOptions LOpts;
LOpts.System.LinkLibraries.push_back("stdc++");
LOpts.System.LinkLibraries.push_back("stdc++fs");
auto Linker = std::make_shared<GNULinker>();
Linker->Type = LinkerType::GNU;
Linker->file = "o64-gcc";
Linker->use_start_end_groups = false;
*Linker = LOpts;
s.registerProgram("org.gnu.gcc.ld", Linker);
}
NativeCompilerOptions COpts;
// ASM
{
auto L = std::make_shared<NativeLanguage>();
L->CompiledExtensions = { ".s", ".S" };
auto C = std::make_shared<GNUASMCompiler>();
C->Type = CompilerType::GNU;
C->file = "x86_64-apple-darwin15-as";
*C = COpts;
L->compiler = C;
s.registerProgramAndLanguage("org.gnu.gcc.as", C, L);
}
// C
{
auto L = std::make_shared<NativeLanguage>();
L->CompiledExtensions = { ".c" };
auto C = std::make_shared<GNUCompiler>();
C->Type = CompilerType::GNU;
C->file = "o64-gcc";
*C = COpts;
L->compiler = C;
s.registerProgramAndLanguage("org.gnu.gcc.gcc", C, L);
}
// CPP
{
auto L = std::make_shared<NativeLanguage>();
L->CompiledExtensions = getCppSourceFileExtensions();
auto C = std::make_shared<GNUCompiler>();
C->Type = CompilerType::GNU;
C->file = "o64-g++";
*C = COpts;
L->compiler = C;
s.registerProgramAndLanguage("org.gnu.gcc.gpp", C, L);
}
}
}