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

Support using ccache when building gengetopt and ragel #732

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

jeshwanthreddy13
Copy link

@jeshwanthreddy13 jeshwanthreddy13 commented Jun 18, 2024

Fixes #639

  • Implemented ccache support when building gengetopt and ragel in file 'build-3rdparty.py'.
  • Added 'CC' and 'CXX' paramters when executing './configure' so as to inject 'ccache' when '--compiler-launcher=ccache' is used.

Additional Notes:

  • Added a new function "detect_compiler_presence" for detecting if a particular compiler is present or not.
  • Respective 'C' and 'C++' compilers are added to CC and CXX respectively by checking if the specific compilers can be executed.
  • Compiler launcher is added in 'CC' and 'CXX' only if the parameter is passed during build.

@gavv
Copy link
Member

gavv commented Jun 18, 2024

Hi!

Please take a look at the part of task about cross-compilation. We can't just use CC and CXX because they're set to cross-compiler, not native compiler.

@jeshwanthreddy13 jeshwanthreddy13 marked this pull request as draft June 18, 2024 11:47
@github-actions github-actions bot added the work in progress Pull request is still in progress and changing label Jun 18, 2024
@jeshwanthreddy13
Copy link
Author

Hi!

Please take a look at the part of task about cross-compilation. We can't just use CC and CXX because they're set to cross-compiler, not native compiler.

Okay, so we need to make sure that CC and CXX are always passed with native compilers instead of the cross compilers for ragel and gengetopt?

@gavv
Copy link
Member

gavv commented Jun 18, 2024

Yes, because they are build tools running during build.

@gavv gavv added the contribution A pull-request by someone else except maintainers label Jun 18, 2024
@jeshwanthreddy13 jeshwanthreddy13 changed the title Support using ccache when building gengetopt and ragel #639 Support using ccache when building gengetopt and ragel Jun 20, 2024
@jeshwanthreddy13 jeshwanthreddy13 marked this pull request as ready for review June 20, 2024 12:21
@github-actions github-actions bot added ready for review Pull request can be reviewed and removed work in progress Pull request is still in progress and changing labels Jun 20, 2024
Copy link
Member

@gavv gavv left a comment

Choose a reason for hiding this comment

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

Thanks for update! A few comments.

scripts/scons_helpers/build-3rdparty.py Outdated Show resolved Hide resolved
scripts/scons_helpers/build-3rdparty.py Outdated Show resolved Hide resolved
scripts/scons_helpers/build-3rdparty.py Outdated Show resolved Hide resolved
scripts/scons_helpers/build-3rdparty.py Outdated Show resolved Hide resolved
@gavv gavv added needs revision Pull request should be revised by its author and removed ready for review Pull request can be reviewed labels Jun 20, 2024
@github-actions github-actions bot added ready for review Pull request can be reviewed and removed needs revision Pull request should be revised by its author labels Jun 21, 2024
@gavv gavv added this to the next milestone Jun 23, 2024
Fixes #639

- Implemented ccache support when building gengetopt and ragel in file 'build-3rdparty.py'.
- Added 'CC' and 'CXX' paramters when executing './configure' so as to inject ccache when '--compiler-launcher=ccache' is used.

Additional Notes:
- Added two new functions "detect_compiler_presence" "detect_native_cc_cxx_compilers" for detecting if a particular native compiler is present or not by executing it with -v argument.
- Added a third optional argument 'env' in function "format_vars" to format using that argument when it is passed.
@gavv gavv merged commit 63a6517 into roc-streaming:develop Jun 23, 2024
6 checks passed
@github-actions github-actions bot removed the ready for review Pull request can be reviewed label Jun 23, 2024
@gavv
Copy link
Member

gavv commented Jun 23, 2024

Thanks!!

Small follow-up commit: bf5e365

(see commit message for details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution A pull-request by someone else except maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants