Steven Walters
2013-06-09 23:59:04 UTC
Hi,
I came across
https://github.com/gradle/gradle/blob/master/design-docs/continuous-delivery-for-c-plus-plus.mda
couple weeks ago and it has piqued my interest.
I've been working on converting some projects to use gradle at work as
we're primarily java though given that we tend to deal with some
applications that only have C/C++ APIs.
Honestly, converting these projects have become a bit "clunky" with needing
to utilize something such as GNU make for the C++ portions.
Overall, the series of stories is fairly well thought out, but I did have
some questions.
(This did come out to be rather long, so maybe tackle this in 'chunks'?)
1) Regarding the 'Build a static library binary' story, there is a point
listed
"Add the '-fPIC' flag when compiling to ensure that the static library can
be included in a shared library"
That I have some concerns with making this a forced option.
There are typically performance implications caused by PIC-supported native
code that projects have some tendency to avoid when only building static
libraries/executables.
I would argue that this should not be a forced option, but instead be more
dynamic in being enabled only if shared code is configured to also be built
and then have static-only builds add the option/flag by the user if desired.
The natural exclusion to this is Windows, where all code has to be PE,
which makes the -fPIC option cause an ignore warning in MinGW, due to it
always having to make PE-compatible code.
2) Regarding the 'Build a native component using multiple tool chains' and
'Build a native component for multiple architectures' stories,
Is there any plan to switch to the Visual Studio discovery mechanism to be
more dynamic than expecting the cl, lib and link executables to already be
on the Path (meaning that the environment was already configured)?
we often find ourselves needing to build a library using multiple versions
of Visual studio, such as 8 (2005), 9 (2008), and 10 (2010)... soon this
will likely include 11 (2012).
There are various reasons for this, primarily stemming from the the
application running our libraries not allowing a mixture of MSVC runtimes
or STL incompatibilities between different versions of MSVC (this is
similar in nature to libstd++ major version differences)
I would ignore the existence of MSVS versions 7.0 (2002) and 7.1 (2003) due
to their age, somewhat differing folder structure from the later versions,
and lack of x86_64 support.
3) Again regarding 'Build a native component using multiple tool chains',
I am currently wondering if Intel's compiler would warrant official
recognition, or be left to the user to configure the binary names and flags
themselves...
There are some differences between MSVS and Intel's Compiler for Windows
that could be benefit from this, such as Intel's compiler having -QMM/-QMT
options that work similar to gcc/g++'s -MM/-MT flags, though I've found
this to be fairly slow in comparison to MinGW.
It will also be important when it comes to the story where MSVS
projects/solutions would be created.
I'm not aware of much difference on Linux-based or Mac OSX versions of
Intel's compiler outside of the toolchain binary names that would require
official recognition.
4) pkg-config as a 'repository'?
I did not see mention of pkg-config in the series of stories.
I'm not sure if it was meant to be implied within the publishing or
dependency stories, but given how it works pretty close to a repository
(though a local one) and fairly prevalent among the unix-based systems, it
would be beneficial to see it be supported within gradle.
5) Profile optimizations?
Visual Studio and GCC both have concepts of optimizing binaries through
executable profiling.
This makes building a good bit more complicated as you technically have to
build the executable with profiling enabled, execute it some <X> number of
times, and then rebuild it again with the profiling data.
Naturally, this can't work for cross-compilation scenarios, but it may be
worth to have as an additional story at the end.
I also have interest in contributing to the completion of the support for
C++ and associated languages, though I'm not sure how much 'ramp up time'
there would be due to my current unfamiliarity with gradle's overall
codebase.
Thank you for spending the time to read this rather long email, and I look
forward to any feedback.
--
Steven Walters
I came across
https://github.com/gradle/gradle/blob/master/design-docs/continuous-delivery-for-c-plus-plus.mda
couple weeks ago and it has piqued my interest.
I've been working on converting some projects to use gradle at work as
we're primarily java though given that we tend to deal with some
applications that only have C/C++ APIs.
Honestly, converting these projects have become a bit "clunky" with needing
to utilize something such as GNU make for the C++ portions.
Overall, the series of stories is fairly well thought out, but I did have
some questions.
(This did come out to be rather long, so maybe tackle this in 'chunks'?)
1) Regarding the 'Build a static library binary' story, there is a point
listed
"Add the '-fPIC' flag when compiling to ensure that the static library can
be included in a shared library"
That I have some concerns with making this a forced option.
There are typically performance implications caused by PIC-supported native
code that projects have some tendency to avoid when only building static
libraries/executables.
I would argue that this should not be a forced option, but instead be more
dynamic in being enabled only if shared code is configured to also be built
and then have static-only builds add the option/flag by the user if desired.
The natural exclusion to this is Windows, where all code has to be PE,
which makes the -fPIC option cause an ignore warning in MinGW, due to it
always having to make PE-compatible code.
2) Regarding the 'Build a native component using multiple tool chains' and
'Build a native component for multiple architectures' stories,
Is there any plan to switch to the Visual Studio discovery mechanism to be
more dynamic than expecting the cl, lib and link executables to already be
on the Path (meaning that the environment was already configured)?
we often find ourselves needing to build a library using multiple versions
of Visual studio, such as 8 (2005), 9 (2008), and 10 (2010)... soon this
will likely include 11 (2012).
There are various reasons for this, primarily stemming from the the
application running our libraries not allowing a mixture of MSVC runtimes
or STL incompatibilities between different versions of MSVC (this is
similar in nature to libstd++ major version differences)
I would ignore the existence of MSVS versions 7.0 (2002) and 7.1 (2003) due
to their age, somewhat differing folder structure from the later versions,
and lack of x86_64 support.
3) Again regarding 'Build a native component using multiple tool chains',
I am currently wondering if Intel's compiler would warrant official
recognition, or be left to the user to configure the binary names and flags
themselves...
There are some differences between MSVS and Intel's Compiler for Windows
that could be benefit from this, such as Intel's compiler having -QMM/-QMT
options that work similar to gcc/g++'s -MM/-MT flags, though I've found
this to be fairly slow in comparison to MinGW.
It will also be important when it comes to the story where MSVS
projects/solutions would be created.
I'm not aware of much difference on Linux-based or Mac OSX versions of
Intel's compiler outside of the toolchain binary names that would require
official recognition.
4) pkg-config as a 'repository'?
I did not see mention of pkg-config in the series of stories.
I'm not sure if it was meant to be implied within the publishing or
dependency stories, but given how it works pretty close to a repository
(though a local one) and fairly prevalent among the unix-based systems, it
would be beneficial to see it be supported within gradle.
5) Profile optimizations?
Visual Studio and GCC both have concepts of optimizing binaries through
executable profiling.
This makes building a good bit more complicated as you technically have to
build the executable with profiling enabled, execute it some <X> number of
times, and then rebuild it again with the profiling data.
Naturally, this can't work for cross-compilation scenarios, but it may be
worth to have as an additional story at the end.
I also have interest in contributing to the completion of the support for
C++ and associated languages, though I'm not sure how much 'ramp up time'
there would be due to my current unfamiliarity with gradle's overall
codebase.
Thank you for spending the time to read this rather long email, and I look
forward to any feedback.
--
Steven Walters