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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
module Options.Linking where
import Types
linkingOptions :: [Flag]
linkingOptions =
[ flag { flagName = "-shared"
, flagDescription =
"Generate a shared library (as opposed to an executable)"
, flagType = DynamicFlag
}
, flag { flagName = "-staticlib"
, flagDescription =
"On Darwin/OS X/iOS only, generate a standalone static library " ++
"(as opposed to an executable). This is the usual way to " ++
"compile for iOS."
, flagType = DynamicFlag
}
, flag { flagName = "-fPIC"
, flagDescription =
"Generate position-independent code (where available)"
, flagType = DynamicFlag
}
, flag { flagName = "-dynload"
, flagDescription =
"Selects one of a number of modes for finding shared libraries at runtime."
, flagType = DynamicFlag
}
, flag { flagName = "-framework⟨name⟩"
, flagDescription =
"On Darwin/OS X/iOS only, link in the framework ⟨name⟩. This " ++
"option corresponds to the ``-framework`` option for Apple's Linker."
, flagType = DynamicFlag
}
, flag { flagName = "-framework-path⟨name⟩"
, flagDescription =
"On Darwin/OS X/iOS only, add ⟨dir⟩ to the list of directories " ++
"searched for frameworks. This option corresponds to the ``-F`` "++
"option for Apple's Linker."
, flagType = DynamicFlag
}
, flag { flagName = "-l⟨lib⟩"
, flagDescription = "Link in library ⟨lib⟩"
, flagType = DynamicFlag
}
, flag { flagName = "-L⟨dir⟩"
, flagDescription =
"Add ⟨dir⟩ to the list of directories searched for libraries"
, flagType = DynamicFlag
}
, flag { flagName = "-main-is"
, flagDescription = "Set main module and function"
, flagType = DynamicFlag
}
, flag { flagName = "--mk-dll"
, flagDescription = "DLL-creation mode (Windows only)"
, flagType = DynamicFlag
}
, flag { flagName = "-no-hs-main"
, flagDescription = "Don't assume this program contains ``main``"
, flagType = DynamicFlag
}
, flag { flagName = "-rtsopts,-rtsopts={none,some,all}"
, flagDescription =
"Control whether the RTS behaviour can be tweaked via command-line"++
"flags and the ``GHCRTS`` environment variable. Using ``none`` " ++
"means no RTS flags can be given; ``some`` means only a minimum " ++
"of safe options can be given (the default), and ``all`` (or no " ++
"argument at all) means that all RTS flags are permitted."
, flagType = DynamicFlag
}
, flag { flagName = "-with-rtsopts=opts"
, flagDescription = "Set the default RTS options to ⟨opts⟩."
, flagType = DynamicFlag
}
, flag { flagName = "-no-rtsopts-suggestions"
, flagDescription =
"Don't print RTS suggestions about linking with :ghc-flag:`rtsopts`."
, flagType = DynamicFlag
}
, flag { flagName = "-no-link"
, flagDescription = "Omit linking"
, flagType = DynamicFlag
}
, flag { flagName = "-split-objs"
, flagDescription = "Split objects (for libraries)"
, flagType = DynamicFlag
}
, flag { flagName = "-split-sections"
, flagDescription = "Split sections for link-time dead-code stripping"
, flagType = DynamicFlag
}
, flag { flagName = "-static"
, flagDescription = "Use static Haskell libraries"
, flagType = DynamicFlag
}
, flag { flagName = "-threaded"
, flagDescription = "Use the threaded runtime"
, flagType = DynamicFlag
}
, flag { flagName = "-debug"
, flagDescription = "Use the debugging runtime"
, flagType = DynamicFlag
}
, flag { flagName = "-ticky"
, flagDescription =
"For linking, this simply implies :ghc-flag:`debug`; "++
"see :ref:`ticky-ticky`."
, flagType = DynamicFlag
}
, flag { flagName = "-eventlog"
, flagDescription = "Enable runtime event tracing"
, flagType = DynamicFlag
}
, flag { flagName = "-fno-gen-manifest"
, flagDescription = "Do not generate a manifest file (Windows only)"
, flagType = DynamicFlag
}
, flag { flagName = "-fno-embed-manifest"
, flagDescription =
"Do not embed the manifest in the executable (Windows only)"
, flagType = DynamicFlag
}
, flag { flagName = "-fno-shared-implib"
, flagDescription =
"Don't generate an import library for a DLL (Windows only)"
, flagType = DynamicFlag
}
, flag { flagName = "-dylib-install-name ⟨path⟩"
, flagDescription =
"Set the install name (via ``-install_name`` passed to Apple's " ++
"linker), specifying the full install path of the library file. " ++
"Any libraries or executables that link with it later will pick " ++
"up that path as their runtime search location for it. " ++
"(Darwin/OS X only)"
, flagType = DynamicFlag
}
, flag { flagName = "-rdynamic"
, flagDescription =
"This instructs the linker to add all symbols, not only used " ++
"ones, to the dynamic symbol table. Currently Linux and " ++
"Windows/MinGW32 only. This is equivalent to using " ++
"``-optl -rdynamic`` on Linux, and ``-optl -export-all-symbols`` " ++
"on Windows."
, flagType = DynamicFlag
}
]
|