dummy-link

CompilerOptions

A Julia package for reading compiler options

Readme

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.

First Commit

09/16/2014

Last Touched

over 3 years ago

Commits

10 commits