SCons tool for LLVM clang compiler
Project description
SCons support for LLVM clang C compiler.
Important note
SCons currently provides clang tool which replaces this one. See SCons user documentation, especially the tool list. This package is left here for historical reasons and for some experimental purposes.
Installation
There are few ways to install this tool to your project.
From pypi
pip install scons-tool-loader scons-tool-clang
or, if your project uses pipenv:
pipenv install --dev scons-tool-loader scons-tool-clang
Alternatively, you may add this to your Pipfile
[dev-packages]
scons-tool-loader = "*"
scons-tool-clang = "*"
The tool will be installed as a namespaced package sconstool.clang in project’s virtual environment. You may further use scons-tool-loader to load the tool.
As a git submodule
Create new git repository:
mkdir /tmp/prj && cd /tmp/prj touch README.rst git init
Add the scons-tool-clang as a submodule:
git submodule add git://github.com/ptomulik/scons-tool-clang.git site_scons/site_tools/clang
Usage example
Create simple C file
// test.c int main() { return 0; }
Create simple SConstruct file
# SConstruct # TODO: uncomment following lines if the tool is installed via pip/pipenv # import sconstool.loader # sconstool.loader.extend_toolpath(transparent=True) env = Environment(tools = ['default', 'clang']) print(env.subst("using $CC $CCVERSION")) env.Program('test.c')
Try it out:
scons
LICENSE
Copyright (c) 2014-2020 by Paweł Tomulik <ptomulik@meil.pw.edu.pl>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scons-tool-clang-0.2.10.tar.gz
.
File metadata
- Download URL: scons-tool-clang-0.2.10.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa6a09d320332529bc6d04499db89f0e7debbdf0de1f1e159863cc0db3cf500 |
|
MD5 | 4f64f1658b80264f57b13594dd872367 |
|
BLAKE2b-256 | fd26782506c76da3d74ca90006b0285dfecd5caa05983c39c9cbadecb333aeac |
File details
Details for the file scons_tool_clang-0.2.10-py3-none-any.whl
.
File metadata
- Download URL: scons_tool_clang-0.2.10-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcec17d44c830b9165f64dc8a8d4a4d5e47b265130f8c853872cce002cf8ce06 |
|
MD5 | 7c555c53e6a054bbc610a6c21fdcd40c |
|
BLAKE2b-256 | 7fe01d8b38a58c7fa3785b2e5dcdadd763befd768319e8150c8378b4980e0157 |