1 2 3 4 5 6 7 8 9 10 11
12
13 /*!
14 * ======== Mingw.xdc ========
15 * MinGW native Windows target
16 *
17 * This module defines a native target for Windows using the mingw compiler.
18 *
19 * The mingw compiler is a freely available (www.mingw.org) port of GCC that
20 * can build Windows compatible libraries, DLLs, and executables.
21 */
22 metaonly module Mingw inherits gnu.targets.ITarget {
23 override readonly config string name = "Mingw";
24 override readonly config string os = "Windows";
25 override readonly config string suffix = "86GW";
26 override readonly config string isa = "x86";
27 override readonly config xdc.bld.ITarget.Model model = {
28 endian: "little"
29 };
30
31 override readonly config string rts = "gnu.targets.rts86GW";
32
33 override config string platform = "host.platforms.PC";
34
35 override config string LONGNAME = "/bin/mingw32-gcc.exe";
36
37 /*!
38 * ======== cmdPrefix ========
39 * Prefix to put in front of each command
40 *
41 * This string is put in front of every Command before being passed to
42 * the shell for execution. This string can be used to run the compiler
43 * in emulation environments.
44 */
45 config String cmdPrefix = "";
46
47 override config xdc.bld.ITarget2.Options ccOpts = {
48 prefix: "-Wunused",
49 suffix: "-Dfar= "
50 };
51
52 override config xdc.bld.ITarget2.Options lnkOpts = {
53 prefix: "",
54 suffix: "-Wl,-Map=$(XDCCFGDIR)/$@.map -lstdc++ -L$(rootDir)/lib"
55 };
56
57 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
58 t_IArg : { size: 4, align: 4 },
59 t_Char : { size: 1, align: 1 },
60 t_Double : { size: 8, align: 4 },
61 t_Float : { size: 4, align: 4 },
62 t_Fxn : { size: 4, align: 4 },
63 t_Int : { size: 4, align: 4 },
64 t_Int8 : { size: 1, align: 1 },
65 t_Int16 : { size: 2, align: 2 },
66 t_Int32 : { size: 4, align: 4 },
67 t_Int64 : { size: 8, align: 4 },
68 t_Long : { size: 4, align: 4 },
69 t_LDouble : { size: 12, align: 4 },
70 t_LLong : { size: 8, align: 4 },
71 t_Ptr : { size: 4, align: 4 },
72 t_Short : { size: 2, align: 2 },
73 };
74 }
75 76 77 78
79