wllvm


Namewllvm JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/SRI-CSL/whole-program-llvm
SummaryWhole Program LLVM
upload_time2021-04-10 16:39:43
maintainer
docs_urlNone
authorIan A. Mason, Tristan Ravitch, Dan Liew, Bruno Dutertre, Benjamin Schubert, Berkeley Churchill, Marko Dimjasevic, Will Dietz, Fabian Mager, Ben Liblit, Andrew Santosa, Tomas Kalibera, Loic Gelle, Joshua Cranmer, Alexander Bakst, Miguel Arroyo.
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            Introduction to WLLVM
=====================

This project, WLLVM, provides tools for building whole-program (or
whole-library) LLVM bitcode files from an unmodified C or C++
source package. It currently runs on `*nix` platforms such as Linux,
FreeBSD, and Mac OS X.

WLLVM provides python-based compiler wrappers that work in two
steps. The wrappers first invoke the compiler as normal. Then, for
each object file, they call a bitcode compiler to produce LLVM
bitcode. The wrappers also store the location of the generated bitcode
file in a dedicated section of the object file.  When object files are
linked together, the contents of the dedicated sections are
concatenated (so we don't lose the locations of any of the constituent
bitcode files). After the build completes, one can use an WLLVM
utility to read the contents of the dedicated section and link all of
the bitcode into a single whole-program bitcode file. This utility
works for both executable and native libraries.

This two-phase build process is necessary to be a drop-in replacement
for ``gcc`` or ``g++`` in any build system.  Using the LTO framework in gcc
and the gold linker plugin works in many cases, but fails in the
presence of static libraries in builds.  WLLVM's approach has the
distinct advantage of generating working binaries, in case some part
of a build process requires that.

WLLVM works with either ``clang`` or the ``gcc dragonegg`` plugin.


Usage
-----

WLLVM includes four python executables: ``wllvm`` for compiling C code
and ``wllvm++`` for compiling C++, an auxiliary tool ``extract-bc`` for
extracting the bitcode from a build product (object file, executable, library
or archive), and a sanity checker, ``wllvm-sanity-checker`` for detecting
configuration oversights.

Three environment variables must be set to use these wrappers:

 * ``LLVM_COMPILER`` should be set to either ``dragonegg`` or ``clang``.
 * ``LLVM_GCC_PREFIX`` should be set to the prefix for the version of gcc that should
   be used with dragonegg.  This can be empty if there is no prefix.  This variable is
   not used if ``$LLVM_COMPILER == clang``.
 * ``LLVM_DRAGONEGG_PLUGIN`` should be the full path to the dragonegg plugin.  This
   variable is not used if ``$LLVM_COMPILER == clang``.

Once the environment is set up, just use ``wllvm`` and ``wllvm++`` as your C
and C++ compilers, respectively.


In addition to the above environment variables the following can be optionally used:

 * ``LLVM_CC_NAME`` can be set if your clang compiler is not called ``clang`` but
   something like ``clang-3.7``. Similarly ``LLVM_CXX_NAME`` can be used to describe
   what the C++ compiler is called. Note that in these sorts of cases, the environment
   variable ``LLVM_COMPILER`` should still be set to ``clang`` not ``clang-3.7`` etc.
   We also pay attention to the environment variables ``LLVM_LINK_NAME`` and ``LLVM_AR_NAME`` in an
   analagous way,  since they too get adorned with suffixes in various Linux distributions.

 * ``LLVM_COMPILER_PATH`` can be set to the absolute path to the folder that
   contains the compiler and other LLVM tools such as ``llvm-link`` to be used.
   This prevents searching for the compiler in your PATH environment variable.
   This can be useful if you have different versions of clang on your system
   and you want to easily switch compilers without tinkering with your PATH
   variable.
   Example ``LLVM_COMPILER_PATH=/home/user/llvm_and_clang/Debug+Asserts/bin``.

 * ``WLLVM_CONFIGURE_ONLY`` can be set to anything. If it is set, ``wllvm``
   and ``wllvm++`` behave like a normal C or C++ compiler. They do not
   produce bitcode.  Setting ``WLLVM_CONFIGURE_ONLY`` may prevent
   configuration errors caused by the unexpected production of hidden
   bitcode files.


Documentation
-------------

More detailed documentation as well as some tutorials can be found
here:

https://github.com/SRI-CSL/whole-program-llvm



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SRI-CSL/whole-program-llvm",
    "name": "wllvm",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ian A. Mason, Tristan Ravitch, Dan Liew, Bruno Dutertre, Benjamin Schubert, Berkeley Churchill, Marko Dimjasevic, Will Dietz, Fabian Mager, Ben Liblit, Andrew Santosa, Tomas Kalibera, Loic  Gelle, Joshua Cranmer, Alexander Bakst, Miguel Arroyo.",
    "author_email": "iam@csl.sri.com",
    "download_url": "https://files.pythonhosted.org/packages/4b/df/31d7519052bc21d0e9771e9a6540d6310bfb13bae7dacde060d8f647b8d3/wllvm-1.3.1.tar.gz",
    "platform": "",
    "description": "Introduction to WLLVM\n=====================\n\nThis project, WLLVM, provides tools for building whole-program (or\nwhole-library) LLVM bitcode files from an unmodified C or C++\nsource package. It currently runs on `*nix` platforms such as Linux,\nFreeBSD, and Mac OS X.\n\nWLLVM provides python-based compiler wrappers that work in two\nsteps. The wrappers first invoke the compiler as normal. Then, for\neach object file, they call a bitcode compiler to produce LLVM\nbitcode. The wrappers also store the location of the generated bitcode\nfile in a dedicated section of the object file.  When object files are\nlinked together, the contents of the dedicated sections are\nconcatenated (so we don't lose the locations of any of the constituent\nbitcode files). After the build completes, one can use an WLLVM\nutility to read the contents of the dedicated section and link all of\nthe bitcode into a single whole-program bitcode file. This utility\nworks for both executable and native libraries.\n\nThis two-phase build process is necessary to be a drop-in replacement\nfor ``gcc`` or ``g++`` in any build system.  Using the LTO framework in gcc\nand the gold linker plugin works in many cases, but fails in the\npresence of static libraries in builds.  WLLVM's approach has the\ndistinct advantage of generating working binaries, in case some part\nof a build process requires that.\n\nWLLVM works with either ``clang`` or the ``gcc dragonegg`` plugin.\n\n\nUsage\n-----\n\nWLLVM includes four python executables: ``wllvm`` for compiling C code\nand ``wllvm++`` for compiling C++, an auxiliary tool ``extract-bc`` for\nextracting the bitcode from a build product (object file, executable, library\nor archive), and a sanity checker, ``wllvm-sanity-checker`` for detecting\nconfiguration oversights.\n\nThree environment variables must be set to use these wrappers:\n\n * ``LLVM_COMPILER`` should be set to either ``dragonegg`` or ``clang``.\n * ``LLVM_GCC_PREFIX`` should be set to the prefix for the version of gcc that should\n   be used with dragonegg.  This can be empty if there is no prefix.  This variable is\n   not used if ``$LLVM_COMPILER == clang``.\n * ``LLVM_DRAGONEGG_PLUGIN`` should be the full path to the dragonegg plugin.  This\n   variable is not used if ``$LLVM_COMPILER == clang``.\n\nOnce the environment is set up, just use ``wllvm`` and ``wllvm++`` as your C\nand C++ compilers, respectively.\n\n\nIn addition to the above environment variables the following can be optionally used:\n\n * ``LLVM_CC_NAME`` can be set if your clang compiler is not called ``clang`` but\n   something like ``clang-3.7``. Similarly ``LLVM_CXX_NAME`` can be used to describe\n   what the C++ compiler is called. Note that in these sorts of cases, the environment\n   variable ``LLVM_COMPILER`` should still be set to ``clang`` not ``clang-3.7`` etc.\n   We also pay attention to the environment variables ``LLVM_LINK_NAME`` and ``LLVM_AR_NAME`` in an\n   analagous way,  since they too get adorned with suffixes in various Linux distributions.\n\n * ``LLVM_COMPILER_PATH`` can be set to the absolute path to the folder that\n   contains the compiler and other LLVM tools such as ``llvm-link`` to be used.\n   This prevents searching for the compiler in your PATH environment variable.\n   This can be useful if you have different versions of clang on your system\n   and you want to easily switch compilers without tinkering with your PATH\n   variable.\n   Example ``LLVM_COMPILER_PATH=/home/user/llvm_and_clang/Debug+Asserts/bin``.\n\n * ``WLLVM_CONFIGURE_ONLY`` can be set to anything. If it is set, ``wllvm``\n   and ``wllvm++`` behave like a normal C or C++ compiler. They do not\n   produce bitcode.  Setting ``WLLVM_CONFIGURE_ONLY`` may prevent\n   configuration errors caused by the unexpected production of hidden\n   bitcode files.\n\n\nDocumentation\n-------------\n\nMore detailed documentation as well as some tutorials can be found\nhere:\n\nhttps://github.com/SRI-CSL/whole-program-llvm\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Whole Program LLVM",
    "version": "1.3.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "99f0b878ec48fc1f5c568862a2df883e8fdd4f2a79e0b6f1bede0e3ec6dfeb8f",
                "md5": "89931d8cca7227ec8069c7283aa7de77",
                "sha256": "eaf9e319a8d6b56c0f43dbe118823c9e1901e5a733f4e34d44ffc26852f62091"
            },
            "downloads": -1,
            "filename": "wllvm-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89931d8cca7227ec8069c7283aa7de77",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 32694,
            "upload_time": "2021-04-10T16:39:41",
            "upload_time_iso_8601": "2021-04-10T16:39:41.712713Z",
            "url": "https://files.pythonhosted.org/packages/99/f0/b878ec48fc1f5c568862a2df883e8fdd4f2a79e0b6f1bede0e3ec6dfeb8f/wllvm-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4bdf31d7519052bc21d0e9771e9a6540d6310bfb13bae7dacde060d8f647b8d3",
                "md5": "ac8e009a47407cf6377ab057d7db6c37",
                "sha256": "3e057a575f05c9ecc8669a8c4046f2bfdf0c69533b87b4fbfcabe0df230cc331"
            },
            "downloads": -1,
            "filename": "wllvm-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ac8e009a47407cf6377ab057d7db6c37",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 28757,
            "upload_time": "2021-04-10T16:39:43",
            "upload_time_iso_8601": "2021-04-10T16:39:43.446618Z",
            "url": "https://files.pythonhosted.org/packages/4b/df/31d7519052bc21d0e9771e9a6540d6310bfb13bae7dacde060d8f647b8d3/wllvm-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-04-10 16:39:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "SRI-CSL",
    "github_project": "whole-program-llvm",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "wllvm"
}
        
Elapsed time: 0.04864s