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 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
.\" Written by Tommi Höynälänmaa (tommi.hoynalanmaa@iki.fi)
.TH THEME_D_LINK 1 2022-04-25 GNU "Theme-D Linker"
.
.SH NAME
theme-d-link \- the Theme-D linker
.
.SH SYNOPSIS
.B theme-d-link
.RB [\|
.IR OPTION
.RB \|]
.RB ...
.IR FILE
.
.SH DESCRIPTION
Link the Theme-D pseudocode file
.IR FILE
and Theme-D libraries it uses into Guile bytecode. The default
bytecode filename is obtained by appending
.IR .go
to the basename of
.IR FILE .
Command
.B theme-d-link
creates an intermediate file either in Guile Tree-IL or Scheme and
uses Guile to compile it into bytecode. The default suffix of the
intermediate file is either
.IR .tree-il
or
.IR .scm .
.
.PP
By default, the output file and the intermediate file are placed into
the directory where the command
.B theme-d-link
is invoked.
.
.SH OPTIONS
.TP
.BR \-o ", " \-\-output =\fIOUTPUTFILE\fR
Specify the compilation output file.
.
.TP
.BR \-m ", " \-\-module-path =\fIPATH\fR
Specify the search path for Theme-D modules. The path should be a list
of directories separated with :\(aqs. You can prefix or suffix the list with a
colon in order to include the default Theme-D library path in the
search path.
.
.TP
.BR \-l ", " \-\-message-level =\fILEVEL\fR
Specify the message level of the compiler. The level has to be an
integer number from 0 to 3. Value 0 means no output and value 3 the
most verbose output.
.
.TP
.BR \-n ", " \-\-intermediate-file =\fIINTFILE\fR
Specify the intermediate filename.
.
.TP
.BR \-i ", " \-\-intermediate-language =\fILANGUAGE\fR
Specify the intermediate language. Value
.IR LANGUAGE
has to be either
.IR tree-il ,
.IR tree-il-3.0 ,
.IR tree-il-2.2 ,
.IR scheme ,
or
.IR scheme-no-opt .
When value
.IR tree-il
is used the Tree-IL version for which Theme-D has been configured is
used.
.
.TP
.BR \-x\ \fIMODULE\fR
Link (load) module
.IR MODULE
into the target program. The syntax of
.IR MODULE
is
.IR (sym1 ... symn)
in double quotes.
.
.TP
.BR \-\-no-final-compilation
Do not compile the intermediate file with
.BR guild
.BR compile .
.
.TP
.BR \-\-no-strip
Do not strip away unused code.
.
.TP
.BR \-\-no-factorization
Do not factorize the type expressions out of procedure
implementations.
.
.TP
.BR \-\-no-weak-assertions
Do not check ordinary assertions. Strong assertions are always
checked.
.
.TP
.BR \-\-backtrace
Print backtrace on compilation error.
.
.TP
.BR \-\-pretty-print
Pretty print the pseudocode output.
.
.TP
.BR \-\-no-verbose-errors
Less information in the error messages.
.
.TP
.BR \-\-verbose-typechecks
More information for runtime type errors.
.
.TP
.BR \-\-keep-intermediate
Keep the intermediate Tree-IL or Scheme file. By default the
intermediate file is deleted.
.
.TP
.BR \-\-link-to-cache
Link the target bytecode file into the guile cache.
.
.TP
.BR \-\-runtime-pretty-backtrace
Generate code to support runtime
pretty printed backtraces.
.
.TP
.BR \-\-no-unlinked-procedure-names
Do not generate code for reporting
unlinked procedure names.
.
.TP
.BR \-\-module-debug-output
Print debug messages when a module body linkage is started and ended.
.
.TP
.BR \-\-show-inst-number
Show the numbers for instantiated expressions.
.
.TP
.BR \-\-check-all-primitives
Check that primitive procedure result values
match the result types for all primitives, including those defined with
\fBunchecked-prim-proc\fR.
.
.TP
.BR \-\-duplicates =\fIsymbols\fR
Set the values passed to \fBdefault-duplicate-binding-handler\fR
in the target program. If there are several symbols enclose them in quotes.
.
.TP
.BR \-\-split
Split the linker output.
.
.TP
.BR \-\-split-dir =\fIdir\fR
Set the directory where to put the split linker output.
.
.TP
.BR \-\-split-basename=\fIname\fR
Split the basename for split linker output files.
.
.TP
.BR \-\-guile-opt-level=\fIlevel\fR
Set the optimization level for final guile compilation. The default is 1.
.
.TP
.BR \-\-extra-guild-options=\fIoptions\fR
Set extra guild options for the final compilation. If there are
several options enclose the in quotes.
.
.TP
.BR \-\-no-inline-constructors
Do not inline constructors in the linked code.
.
.TP
.BR \-\-no-optimization
Use the nonoptimized Guile backend. This option has no effect if the
Tree-IL backend is used.
.
.TP
.BR \-\-no-pair-class-optimization
Do not optimize pair class typechecking.
.
.TP
.BR \-\-no-proc-arg-opt
Do not optimize procedure arguments by inlining.
.
.TP
.BR \-\-unit-type=\fIname\fR
Specify the source file unit type explicitly. The unit type has to be one of
.IR proper-program ,
.IR script ,
.IR body , \ \fRor
.IR interface .
.
.TP
.BR \-\-module
Link the file modularly to a Guile bytecode module.
.
.TP
.BR \-\-plugin
Link the file modularly to a Theme-D plugin. This option implies
.BR --module .
The file has to be a Theme-D module body.
.
.TP
.BR \-\-allow-dupl-foreign-classes
Do not give an error if the same foreign class is used to implement several
Theme-D foreign class definitions.
.
.TP
.BR \-\-guile-target-path=\fIDIRS\fR
Set the Guile library path for final compilation. The argument
.IR DIRS
has to be a colon-separated list of directories.
You can prefix or suffix the list with a
colon in order to include the default path in the
search path.
.
.TP
.BR \-\-empty-guile-target-path
Set
.BR GUILE_LOAD_COMPILED_PATH
to an empty string. Normally the value of
.BR GUILE_LOAD_COMPILED_PATH
is not modified if no Guile target path is given.
.
.TP
.BR \-M ", " \-\-full-module-path =\fIDIRS\fR
This option is equivalent to
.BR \-m
.IR DIRS
.BR \-\-guile-target-path =\fIDIRS\fR.
.
.TP
.BR \-\-version
Show the Theme-D version number and exit.
.
.SH TARGET PLATFORMS
The following
intermediate languages are available:
.TP
.IR tree-il
Guile Tree-IL 3.0.
.
.TP
.IR scheme
Guile Scheme 3.0.
.
.TP
.IR scheme0
Guile Scheme 3.0 without optimizations.
.
.
.SH ENVIRONMENT
.TP
.BR THEME_D_CONFIG_FILE
If this variable is defined its value is used as the Theme-D
configuration file instead of the default configuration file.
.
.SH FILES
.TP
.IR /etc/theme-d-config
The Theme-D configuration file.
.
.TP
.IR ~/.theme-d-config
The Theme-D configuration file. This file should be normally present
only if you use Theme-D in local mode.
.
.SH SEE ALSO
.BR theme-d-compile (1),
.BR run-theme-d-program (1),
.BR setup-theme-d-test-env (1),
.IR /usr/share/doc/theme-d-doc/theme-d-user-guide.pdf.gz
|