8000 Support "system lib mode" for llvm_profiler_runtime · Issue #37 · Amanieu/minicov · GitHub
[go: up one dir, main page]

Skip to content

Support "system lib mode" for llvm_profiler_runtime #37

Open

Description

@shirok1

Thanks for this handy project, it helped us in building a internal WASM test coverage pipeline.

While we are implementing the integration, we found it hard to have our CentOS CI environment with WASM capable Clang installed so we ended up precompile this thing and fork minicov so we can pass its path in with env var:

const LLVM_PROFILER_RUNTIME_ENV: &str = "MINICOV_LLVM_PROFILER_RUNTIME";

fn use_prebuilt_llvm_profiler_runtime(target: &str) -> bool {
   let names = [
       format!("{LLVM_PROFILER_RUNTIME_ENV}_{target}"),
       format!(
           "{LLVM_PROFILER_RUNTIME_ENV}_{}",
           target.replace(['-', '.'], "_")
       ),
       LLVM_PROFILER_RUNTIME_ENV.to_owned(),
   ];
   // ...
}

Later when building:

export MINICOV_LLVM_PROFILER_RUNTIME_wasm32_wasip1="/usr/local/lib/minicov/wasm32-wasip1/libllvm_profiler_runtime.a"

Looking forward to your opinion on how should we contribute this back to upstream (e.g. controlled with cargo features or just read the env var).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0