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

Add metacall include path and metacall library path in c loader #270

Merged
merged 1 commit into from Sep 13, 2022

Conversation

rxbryan
Copy link
Contributor

@rxbryan rxbryan commented May 2, 2022

Description

Add metacall include path so including metacall/metacall.h #include <metacall/metacall.h> works.
Add metacall library path so libtcc can find libmetacall.so.

Fixes #(issue_no)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation update

Checklist:

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests/screenshots (if any) that prove my fix is effective or that my feature works.
  • I have tested the tests implicated (if any) by my own code and they pass (make test or ctest -VV -R <test-name>).
  • If my change is significant or breaking, I have passed all tests with ./docker-compose.sh build &> output and attached the output.
  • I have tested my code with OPTION_BUILD_SANITIZER or ./docker-compose.sh test &> output and OPTION_TEST_MEMORYCHECK.
  • I have tested with Helgrind in case my code works with threading.
  • I have run make clang-format in order to format my code and my code follows the style guidelines.

If you are unclear about any of the above checks, have a look at our documentation here.

@viferga
Copy link
Member

viferga commented May 12, 2022

I am not sure if this is going to work as it is for all cases. It is making me doubt, so I am not sure to merge it. I can try to implement a sightly better version and link it here.

@rxbryan
Copy link
Contributor Author

rxbryan commented May 12, 2022

I can try to implement a sightly better version and link it here.

ok, looking forward to it

@viferga
Copy link
Member

viferga commented Aug 30, 2022

I think we can implement this with portability/path module, so it works for multiple platforms and it handles all the cases (i.e if the path ends with or without slash). Meanwhile I don't want to merge it, but we can leave it for reference.

We can also use filesystem module from c++ 17 but I don't like it, it's very heavy. The portability path are just few small C functions with size safety. We can just use portability_path_join.

@rxbryan
Copy link
Contributor Author

rxbryan commented Aug 31, 2022

We can also use filesystem module from c++ 17 but I don't like it, it's very heavy. The portability path are just few small C functions with size safety. We can just use portability_path_join.
Ok. should I rework the code and update the pr?

@viferga
Copy link
Member

viferga commented Sep 1, 2022

We can also use filesystem module from c++ 17 but I don't like it, it's very heavy. The portability path are just few small C functions with size safety. We can just use portability_path_join.
Ok. should I rework the code and update the pr?

Yeah, feel free to do it.

add metacall library path to tcc_library_path
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.

None yet

2 participants