Skip to content

Conversation

@NHDaly
Copy link
Member

@NHDaly NHDaly commented Mar 3, 2018

Allows the user to specify compiler flags to be passed to cc for
building the shared object and the final executable.


@lucatrv: I'm not sure about the exact name of this flag. Maybe it should just
be cflags? Or maybe extra_cflags or something?

Thanks!

Allows the user to specify compiler flags to be passed to `cc` for
building the shared object and the final executable.
@lucatrv
Copy link
Collaborator

lucatrv commented Mar 4, 2018

I would consider:

"--cc-flags"
arg_type = String
default = nothing
metavar = "<flags>"
help = "pass custom flags to system compiler when building shared library or executable"

Then in static_julia.jl please pass cc_flags to the julia_flags function, so it creates the whole flags list.

@lucatrv
Copy link
Collaborator

lucatrv commented Mar 4, 2018

One reason for --cc-flags is because I am already adding also a --cc flag for custom system compiler, and I think they would list well together.

@codecov-io
Copy link

codecov-io commented Mar 5, 2018

Codecov Report

Merging #41 into master will decrease coverage by 0.13%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
- Coverage   69.93%   69.79%   -0.14%     
==========================================
  Files           5        5              
  Lines         296      298       +2     
==========================================
+ Hits          207      208       +1     
- Misses         89       90       +1
Impacted Files Coverage Δ
src/system_image.jl 83.87% <ø> (ø) ⬆️
src/static_julia.jl 77.03% <83.33%> (-0.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0dec917...104fbd1. Read the comment docs.

@NHDaly
Copy link
Member Author

NHDaly commented Mar 5, 2018

Sounds good to me! I've updated to cc-flags, moved the logic to the julia_flags() function, updated the help string on static_julia(), and added a unit-test specifically covering --cc-flags. :)

PTAL. thanks again!

@lucatrv lucatrv merged commit 6f6740e into JuliaLang:master Mar 5, 2018
@NHDaly NHDaly deleted the ccflags branch March 5, 2018 22:05
NHDaly added a commit to NHDaly/ApplicationBuilder.jl that referenced this pull request Mar 5, 2018
Renaming `juliac.jl`'s flag `--ccflags` to `--cc-flags`, after it was
merged in JuliaLang/PackageCompiler.jl#41.
KristofferC pushed a commit that referenced this pull request Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants