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

Install mimalloc headers in sysroot #21699

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Conversation

Markus87
Copy link
Contributor

@Markus87 Markus87 commented Apr 5, 2024

In my tests the mimalloc headers were available after this change.
This should resolve #21652.

Should you need a test for this I will do my best to provide one.

@sbc100
Copy link
Collaborator

sbc100 commented Apr 5, 2024

We should probably add a small test (to test_other.py) that shows that we can use these headers in a program.

@Markus87
Copy link
Contributor Author

Markus87 commented Apr 5, 2024

@sbc100 Would that be enough? If it is I will add it to this pull request.

emsdk/upstream/emscripten$ python test/runner.py other.test_mimalloc_headers

  @with_both_compilers
  def test_mimalloc_headers(self, compiler):
    src = r'''
      #include <mimalloc.h>

      int main() {
          mi_option_enable(mi_option_verbose);
          return 0;
      }
    '''
    self.do_run(src, emcc_args=['-sMALLOC=mimalloc'] )

It runs with the changes of this pull request, if I remove the changes to system_libs.py and run emcc --clear-cache it fails.

@sbc100
Copy link
Collaborator

sbc100 commented Apr 5, 2024

@sbc100 Would that be enough? If it is I will add it to this pull request.

emsdk/upstream/emscripten$ python test/runner.py other.test_mimalloc_headers

  @with_both_compilers
  def test_mimalloc_headers(self, compiler):
    src = r'''
      #include <mimalloc.h>

      int main() {
          mi_option_enable(mi_option_verbose);
          return 0;
      }
    '''
    self.do_run(src, emcc_args=['-sMALLOC=mimalloc'] )

It runs with the changes of this pull request, if I remove the changes to system_libs.py and run emcc --clear-cache it fails.

Perfect. (You don't need with_both_compilers there though).

test/test_other.py Outdated Show resolved Hide resolved
@sbc100 sbc100 enabled auto-merge (squash) April 5, 2024 18:56
@sbc100 sbc100 merged commit d5da2c4 into emscripten-core:main Apr 5, 2024
29 checks passed
impact-maker pushed a commit to impact-maker/emscripten that referenced this pull request Apr 11, 2024
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.

Make mimalloc headers accessible
2 participants