({{, (RefLink[$CompilationTarget, paclet:ref/$CompilationTarget]) 
gives the default value for the option (RefLink[CompilationTarget, paclet:ref/CompilationTarget]) of (RefLink[Compile, paclet:ref/Compile]).}})

OpenersNotesSection(Spacer1)Details

Possible settings for (RefLink[$CompilationTarget, paclet:ref/$CompilationTarget]) are those given for (RefLink[CompilationTarget, paclet:ref/CompilationTarget]).

The default setting for (RefLink[$CompilationTarget, paclet:ref/$CompilationTarget]) is "WVM".

(RefLink[$CompilationTarget, paclet:ref/$CompilationTarget]) = "WVM" indicates that the Wolfram Language compiler should generate code for the traditional Wolfram Language virtual machine.

(RefLink[$CompilationTarget, paclet:ref/$CompilationTarget]) = "C" indicates that the Wolfram Language compiler should create C code, compile this to an external machine code library, and link back into the Wolfram Language.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

You can set (RefLink[$CompilationTarget, paclet:ref/$CompilationTarget]) to "C" to generate C code from (RefLink[Compile, paclet:ref/Compile]):

cGen=Block[{$CompilationTarget="C"},Compile[{{x}},x^2+Sin[x^2]]]

This runs the compilation using C code:

cGen[ 10]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Compile, paclet:ref/Compile])  ▪  (RefLink[CompiledFunction, paclet:ref/CompiledFunction])  ▪  (RefLink[CompilationTarget, paclet:ref/CompilationTarget])  ▪  (RefLink[CompilationOptions, paclet:ref/CompilationOptions])  ▪  (RefLink[RuntimeAttributes, paclet:ref/RuntimeAttributes])  ▪  (RefLink[Parallelization, paclet:ref/Parallelization])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Compiling Wolfram Language Expressions, paclet:tutorial/CompilingWolframLanguageExpressions])}})}})