# JuliaC - Modifying flags passed to julia and cc compiler

**URL:** <https://discourse.julialang.org/t/juliac-modifying-flags-passed-to-julia-and-cc-compiler/133601>\
**Category:** General Usage\
**Tags:** juliac, static-compilation\
**Created:** [November 2, 2025, 9:42am UTC](https://discourse.julialang.org/t/juliac-modifying-flags-passed-to-julia-and-cc-compiler/133601 "2025-11-02T09:42:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xlxs4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xlxs4/32/223653_2.png) [@xlxs4](https://discourse.julialang.org/u/xlxs4)\
**Post date:** [November 2, 2025, 9:42am UTC](https://discourse.julialang.org/t/juliac-modifying-flags-passed-to-julia-and-cc-compiler/133601/1 "2025-11-02T09:42:24Z")

</div>

To modify the flags passed to the julia and cc compiler invocations by JuliaC, I’m using it [programmatically](https://github.com/JuliaLang/JuliaC.jl/blob/fc318f0f623beeb46dabdef9ad830b1c1e2b46c3/README.md#library-api). To modify the arguments passed to julia I can use [`julia_args`](https://github.com/JuliaLang/JuliaC.jl/blob/fc318f0f623beeb46dabdef9ad830b1c1e2b46c3/src/JuliaC.jl#L21). If I use the JuliaC binary (`juliac`) I can pass arguments passed to julia [using the `--` separator](https://github.com/JuliaLang/Pkg.jl/pull/4381). To modify the compile command (both the compiler used and the flags passed to it) I’m using [`JULIA_CC`](https://github.com/JuliaLang/JuliaC.jl/blob/fc318f0f623beeb46dabdef9ad830b1c1e2b46c3/src/linking.jl#L21). The recipe API can be found in the [`struct` definitions](https://github.com/JuliaLang/JuliaC.jl/blob/fc318f0f623beeb46dabdef9ad830b1c1e2b46c3/src/JuliaC.jl)
