WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

FunctionCompileExportString [fspec]

gives a string of textual LLVM code obtained by compiling the function specification fspec.

FunctionCompileExportString [defs,fspec]

uses the auxiliary definitions defs for compilation.

FunctionCompileExportString [fspec,"format"]

gives a string of textual code in the specified format.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Options  
CompilerEnvironment  
ProgressReporting  
TargetSystem  
See Also
Tech Notes
Related Guides
History
Cite this Page

FunctionCompileExportString [fspec]

gives a string of textual LLVM code obtained by compiling the function specification fspec.

FunctionCompileExportString [defs,fspec]

uses the auxiliary definitions defs for compilation.

FunctionCompileExportString [fspec,"format"]

gives a string of textual code in the specified format.

Details and Options

Examples

open all close all

Basic Examples  (4)

Generate a compiled version of a function and return the resulting LLVM IR as a string:

The export format can be given explicitly:

Generate a compiled version of a function and return the resulting LLVM IR as a string:

Several functions can be compiled with FunctionCompileExportString :

It can be useful to use an association to hold the functions:

Auxiliary definitions can be given with FunctionDeclaration :

Results for several target systems can be generated:

Options  (3)

CompilerEnvironment  (1)

Create a compiler environment and add a function definition:

Use a compiler environment in a compilation:

ProgressReporting  (1)

Progress during a compilation is reported:

This can be suppressed by setting the option ProgressReporting to False .

The default value of ProgressReporting is Automatic , which means that the global setting $ProgressReporting is used. If this is set to False , then no progress reporting takes place.

TargetSystem  (1)

The default setting of Automatic generates code for the machine architecture on which it is being run:

TargetSystem can be set to the $SystemID of the desired platform:

TargetSystem can be combined with different format settings:

TargetSystem can be set for architectures for which the Wolfram Engine does not exist:

Tech Notes

Wolfram Research (2019), FunctionCompileExportString, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExportString.html (updated 2025).

Text

Wolfram Research (2019), FunctionCompileExportString, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExportString.html (updated 2025).

CMS

Wolfram Language. 2019. "FunctionCompileExportString." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/FunctionCompileExportString.html.

APA

Wolfram Language. (2019). FunctionCompileExportString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionCompileExportString.html

BibTeX

@misc{reference.wolfram_2025_functioncompileexportstring, author="Wolfram Research", title="{FunctionCompileExportString}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionCompileExportString.html}", note=[Accessed: 19-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_functioncompileexportstring, organization={Wolfram Research}, title={FunctionCompileExportString}, year={2025}, url={https://reference.wolfram.com/language/ref/FunctionCompileExportString.html}, note=[Accessed: 19-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /