Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combine PackageCompiler with static-julia #18

Merged
merged 93 commits into from
Feb 17, 2018
Merged

combine PackageCompiler with static-julia #18

merged 93 commits into from
Feb 17, 2018

Conversation

SimonDanisch
Copy link
Collaborator

No description provided.

vtjnash and others added 30 commits October 23, 2015 18:18
plus it appears to crash the debugger, so i guess it is useful as an anti-disassembler?
Fix #2. 

Obviously we need to set things up so that these restrictions can be lifted.
Use Pkg.dir() by default instead of ~/.julia
Make JULIA_HOME the default installation directory.
Make the syslib extension .dylib on apple.
lucatrv and others added 7 commits January 27, 2018 18:36
…argets

Build only explicitly requested targets by default
* Avoid need to change program.c by providing name.

Changes juliac.jl to provide the name of the created shared lib
("libhello") to the c preprocessor as a macro, via "-D".

This way you do not need to modify the provided program.c when compiling
a new julia program.

Addresses issue #3.

* fix: Also use macro for libname in program2.c

* Update README to reflect macro defined libname.

Remove references from README to changing the image name manually in
`program.c`. Add note about the availability of the image lib name in
the C preprocessor macro.

* Rename lib-name macro variable; remove default val.

s/JULIA_LIB_NAME/JULIAC_JL_PROGRAM_LIBNAME/g;
Remove default value. The libname *must* be provided on the commandline
via `-DJULIAC_JL_PROGRAM_LIBNAME="libname"`.
* Update author information

* Change "--auto" into "--autodeps"

* Code tweaks

* Add Julia v0.7 support
@SimonDanisch
Copy link
Collaborator Author

after discussing the future of PackageCompiler & static-julia, @ViralBShah and I concluded it would be nice to merge the efforts and include the features from static-julia into PackageCompiler.

You may ask, why not include PackageCompiler into static-julia?
I argue that static-julia needs to be a julia package, to gracefully handle dependencies (e.g. install gcc on windows) and to make it possible for users to depend on PackageCompiler! Also like this we can use the usual CI integration.

CC: @lucatrv

// Cleanup and graceful exit
jl_atexit_hook(0);
return 0;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example2.c is a better example file. I think we should just delete this one.

@ViralBShah
Copy link
Member

Also pinging @Keno @StefanKarpinski @vtjnash for their thoughts.

I do thinking having all of this in a package is the right way to go for now to make it easy to install and make it available to package authors.

@vtjnash
Copy link
Member

vtjnash commented Feb 13, 2018

👍

This also aligns well with my original goal of keeping static-julia as a small demo repo for demonstrating and experimenting with the minimum required to use the right compilation flags.

@StefanKarpinski
Copy link
Member

Seems like a good idea to me as well.


function snoop(path, compilationfile, csv)
cd(@__DIR__)
# Snoop compiler can't handle the path as a variable, so we just create a file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I had fixed many of the issues here in SnoopCompile (missing esc in macros, need for tmp_mod, some cases of bad printing). Are there issues filed for these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a second look! I haven't filed any issues yet

@codecov-io
Copy link

codecov-io commented Feb 13, 2018

Codecov Report

Merging #18 into master will decrease coverage by 9.79%.
The diff coverage is 56.74%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #18     +/-   ##
=========================================
- Coverage   61.97%   52.17%   -9.8%     
=========================================
  Files           2        4      +2     
  Lines         142      230     +88     
=========================================
+ Hits           88      120     +32     
- Misses         54      110     +56
Impacted Files Coverage Δ
src/PackageCompiler.jl 36.5% <36.36%> (-19.93%) ⬇️
src/api.jl 50% <50%> (ø)
src/static_julia.jl 50.84% <50.84%> (ø)
src/snooping.jl 76.59% <76.59%> (ø)

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 d25c0a5...e32fd1f. Read the comment docs.

@lucatrv
Copy link
Collaborator

lucatrv commented Feb 13, 2018

Please reconsider the name choices. I would keep the main script named juliac.jl, not only because people are already using it, but also because it is more concise and clear. Then I would rename function julia_compile and its script file juliac.jl respectively static_julia and static_julia.jl. I was already planning this, in order to differentiate it from julia-compile (see: JuliaLang/julia#15864).

@ViralBShah
Copy link
Member

Agree on retaining the name juliac.jl.

@SimonDanisch
Copy link
Collaborator Author

Fair enough!

@lucatrv
Copy link
Collaborator

lucatrv commented Feb 15, 2018

@SimonDanisch please notice also the name of the function julia_comile => static_julia (IMHO it is better to differentiate it from julia-compile).
So I am going to continue developing juliac.jl and static_julia.jl here, I still have a list of things to do... with limited spare time, I should be able to complete in a couple of months, hopefully earlier.
Glad to be part of the development team! :-)

@SimonDanisch
Copy link
Collaborator Author

I wanted to ship this branch with a simple working python wrapper ability, but I got into issues with linking mingw and msvc dll's for python ;) But the prototype is pretty close to completion beside that, and I will try later on linux - which should be a lot easier!
Otherwise I think I should just merge this and make the python PR separate!

@lucatrv
Copy link
Collaborator

lucatrv commented Feb 16, 2018

@ViralBShah I would add a note on static-julia repository to refer users to PackageCompiler.jl.

@lucatrv
Copy link
Collaborator

lucatrv commented Feb 17, 2018

@SimonDanisch once you merge this I can submit next PRs for juliac.jl and static_julia.jl.

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.