A Julia package for reading compiler options
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
.travis.yml
LICENSE.md
README.md

README.md

CompilerOptions

Build Status Coverage Status

This is a basic package for providing introsepction into Julia's compiler options. This functionality is now part of Base in 0.4, so this package aims provide a consistent API between 0.3 and 0.4.

Use

Julia 0.3

CompilerOptions defines the following for Julia 0.3:

    immutable JLOptions
        build_path::Ptr{Cchar}
        cpu_target::Ptr{Cchar}
        code_coverage::Int8
        malloc_log::Int8
        check_bounds::Int8
        int_literals::Cint
    end

    JLOptions() = unsafe_load(cglobal(:jl_compileropts, JLOptions))

For example, it is now possible to see if Julia is being run with code-coverage enabled:

JLOptions().code_coverage

Julia 0.4

Julia 0.4 provides the same type, but is unexported. This package simply provides an alias for the function in Base:

JLOptions() = Base.JLOptions()

Credit

This package was kick started with the help of ihnorton, jakebolewski, and staticfloat.

License

Available under the MIT "Expat" License. See: LICENSE.md.