cy99 / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Improve the build system #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For now, compiling a.py that uses b.py produces a Makefile which does:

g++ -O2 -pipe -Wno-deprecated a.cpp shedskin/lib/builtin.cpp b.cpp
shedskin/lib/re.cpp -o a

1) It'd be better to do
 g++ a.cpp -o a.o
 g++ shedskin/lib/builtin.cpp -o builtin.o
 g++ b.cpp -o b.o
 g++ shedskin/lib/re.cpp -o re.o
 g++ a.o builtin.o b.o re.o -o a
Then, rebuilding the project would only cause the recompilation of the
modified files

2) Actually, builtin.cpp and re.cpp should be compiled when installing shedskin

3) There should be better default options regarding to optimization ie.
-march=native...

4) Warnings should be activated ie. -Wall -Wextra -std=c++98 -pedantic (at
least)

5) Alternate targets for developers would be great:
 - make debug => -O0 -g -ggdb
 - make profile => -O0 -pg -ggdb

Point 3) requires some benchmarks
Point 4) requires some fixes

I add this ticket as a reminder, but I may do it myself someday :-)

Original issue reported on code.google.com by arkanosis on 25 Jan 2010 at 1:54

GoogleCodeExporter commented 8 years ago
thanks, all useful suggestions! but note that as for issue 1), this might have 
an
impact on performance we should measure. iirc, I noticed a speedup from 
compiling
everything together.

another thing might be to add -Lshedskin/lib instead of repeating the same path 
over
and over again.. 

Original comment by mark.duf...@gmail.com on 25 Jan 2010 at 5:04

GoogleCodeExporter commented 8 years ago

Original comment by mark.duf...@gmail.com on 25 Jan 2010 at 5:04

GoogleCodeExporter commented 8 years ago

Original comment by mark.duf...@gmail.com on 18 Mar 2010 at 8:02

GoogleCodeExporter commented 8 years ago

Original comment by mark.duf...@gmail.com on 18 Mar 2010 at 8:05

GoogleCodeExporter commented 8 years ago
as for point 5, I just added two options to the Makefile. suppose the output 
program
is called 'test', you can now 'make test_prof' and 'make test_debug'.. is that 
about
how you envisioned it? :)

Original comment by mark.duf...@gmail.com on 4 Apr 2010 at 4:10

GoogleCodeExporter commented 8 years ago
Yes, it's almost what I was thinking about, thanks :)

Original comment by arkanosis on 6 Apr 2010 at 2:26

GoogleCodeExporter commented 8 years ago
about 3: the compiler flags are now really simple to make sure it works 
everywhere
(for example, apple likes to modify GCC..). it might be better to improve the
performance hints in the tutorial?

about 4: I think this is especially useful during shedskin testing and 
development,
but in practice I'm afraid users would be overwhelmed with warnings that are
difficult to remove..

Original comment by mark.duf...@gmail.com on 7 Apr 2010 at 10:06

GoogleCodeExporter commented 8 years ago
jeremie,

do you think we should keep this issue open?

1./2. probably not very useful, since re-analyzing the python code takes much 
much longer, and cannot be done in separate pieces anyway. and as I mentioned, 
it looks like the resulting code is more efficient when everything is compiled 
together. 

3./4. probably better to keep it as is, as discussed above.

5. done?

Original comment by mark.duf...@gmail.com on 27 Oct 2010 at 1:36

GoogleCodeExporter commented 8 years ago
Hi.

5 is done, others are not that critical, given the other issues discussed above.

So if you want to close this issue, it's fine for me :)

Original comment by arkanosis on 27 Oct 2010 at 2:11

GoogleCodeExporter commented 8 years ago
alright. thanks again. let's revisit the issues separately when they come up. 

Original comment by mark.duf...@gmail.com on 27 Oct 2010 at 2:14