Skip to content

Conversation

@kc611
Copy link
Contributor

@kc611 kc611 commented Jul 2, 2024

As titled this PR adds the option -c/--config to pixie-cc which takes in the path to a json configuration file to specify the TranslationUnit and ExportConfiguration objects.

An example json configuration file is as follows:

{
  "translation_unit": [
    {
      "name": "llvm_foo_double_double",
      "source": "define void @\"_Z3fooPdS_\"(double* %\".1\", double* %\".2\", double* %\".out\")\n{\nentry:\n  %.3 = load double, double* %\".1\"\n  %.4 = load double, double* %\".2\"\n  %\"res\" = fadd double %.3, %.4\n  store double %\"res\", double* %\".out\"\n  ret void\n}\n"
    },
    {
      "name": "llvm_foo_float_float",
      "path": "llvm_foo_float_float.c",
      "extra_flags": []
    },
    {
      "name": "llvm_foo_int_int",
      "path": "foo_int_int.pyx",
      "extra_clang_flags": []
    }
  ],
  "export_config": {
      "symbols": [
        {
          "python_name": "foo",
          "symbol_name": "_Z3fooPdS_",
          "signature": "void(double*, double*, double*)"
        }
      ]
    }
}

…on file which specifies translation units and export configurations
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.

1 participant