commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
96d5c5e53405ace525efc552946a35b03247550c | Kyle Mayes | 2023-02-05T23:08:57 | Add target_env macro | diff --git a/build/macros.rs b/build/macros.rs
index 404cffc..811c7c3 100644
--- a/build/macros.rs
+++ b/build/macros.rs
@@ -25,3 +25,14 @@ macro_rules! target_pointer_width {
}
};
}
+
+macro_rules! target_env {
+ ($env:expr) => {
+ if cfg!(test) && ::std::env::var("_CLANG_SYS_TEST").is_ok() {
... | 2 | 23 | 0 |
a9bf839114f14950f2b9c5da6983baa6b90be0e5 | Kyle Mayes | 2023-02-05T23:05:31 | Rename target macros | diff --git a/build/common.rs b/build/common.rs
index 3169c33..e2daa52 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -250,7 +250,7 @@ fn search_directories(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, S
// keep things consistent with other platforms, only LLVM `lib` directories
// are inclu... | 4 | 19 | 19 |
2ffd9d1303c2d4e323ed235cddf4b9f874611f1e | Kyle Mayes | 2023-02-04T21:26:16 | Only run Windows tests on Windows | diff --git a/tests/build.rs b/tests/build.rs
index 34a1414..d20ecb4 100644
--- a/tests/build.rs
+++ b/tests/build.rs
@@ -217,6 +217,7 @@ fn test_linux_directory_and_version_preference() {
// Windows ---------------------------------------
+#[cfg(target_os = "windows")]
#[test]
#[serial]
fn test_windows_bin_sibl... | 1 | 1 | 0 |
067d9fb147418eb59cce637babbcb69efe3b4468 | Kyle Mayes | 2023-02-04T21:06:55 | Change order of search directories
Previously these were in reverse order of preference which was a tad
confusing to me, not sure why they were like that in the first place. | diff --git a/build/common.rs b/build/common.rs
index dba564b..9c0bad9 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -138,54 +138,61 @@ pub fn run_xcode_select(arguments: &[&str]) -> Option<String> {
//================================================
// Search Directories
//===================================... | 2 | 75 | 22 |
4f234610a2c12fcdb55f53e30644e5b872a5ea16 | Kyle Mayes | 2023-02-04T20:52:03 | Serialize tests for libclang finding code | diff --git a/Cargo.toml b/Cargo.toml
index 29d17c2..ae3dcb8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -53,6 +53,7 @@ glob = "0.3"
[dev-dependencies]
glob = "0.3"
+serial_test = "1"
tempdir = "0.3"
[package.metadata.docs.rs]
diff --git a/tests/build.rs b/tests/build.rs
index 290c1f7..b8fa327 100644
--- a/tests... | 2 | 4 | 0 |
2e2140505f5d939085ae7508172a79ea6cea5435 | Kyle Mayes | 2023-02-04T20:37:01 | Make Windows search directories consistent
A comment references these all being `lib` dirs and the sibling `bin`
dirs are checked so we'll just make them all `lib` dirs to match that
claim | diff --git a/build/common.rs b/build/common.rs
index 3645e25..dba564b 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -175,11 +175,11 @@ const DIRECTORIES_WINDOWS: &[&str] = &[
"C:\\MSYS*\\MinGW*\\lib",
// LLVM + Clang can be installed as a component of Visual Studio.
// https://github.com/KyleMaye... | 2 | 21 | 2 |
5dc8d69bc46a809117b3f64c0f7df55ebf24a0fa | Kyle Mayes | 2023-02-04T19:59:18 | Make libclang finding code testable
This code should probably just be extracted into a separate crate for
testing purposes, but this is easier and has a smaller chance of
breaking stuff. | diff --git a/Cargo.toml b/Cargo.toml
index 1041981..29d17c2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -50,6 +50,11 @@ libloading = { version = "0.7", optional = true }
glob = "0.3"
+[dev-dependencies]
+
+glob = "0.3"
+tempdir = "0.3"
+
[package.metadata.docs.rs]
features = ["clang_16_0", "runtime"]
diff --gi... | 8 | 242 | 23 |
ee47da235b7da0a8db4f4e9e3728eb20d7c8a001 | Anders Langlands | 2022-10-10T06:48:56 | Add clang_CXXRecord_needsImplicitDefaultConstructor and friends | diff --git a/src/lib.rs b/src/lib.rs
index dacd927..cb8591c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1724,6 +1724,18 @@ pub struct IndexerCallbacks {
default!(IndexerCallbacks);
+#[cfg(feature = "clang_16_0")]
+#[derive(Copy, Clone, Debug)]
+#[repr(C)]
+pub struct CXCXXMethodIterator {
+ pub cur: *mut c_voi... | 1 | 39 | 0 |
4e4e8504dcc4518c42bc6f23d3f9a1b2e8de2cdb | Anders Langlands | 2022-09-25T04:57:34 | add new function clang_CXXMethod_isDeleted` | diff --git a/src/lib.rs b/src/lib.rs
index c101ce6..dacd927 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1755,6 +1755,9 @@ link! {
/// Only available on `libclang` 3.9 and later.
#[cfg(feature = "clang_3_9")]
pub fn clang_CXXMethod_isDefaulted(cursor: CXCursor) -> c_uint;
+ /// Only available on `libc... | 1 | 3 | 0 |
308cf86d07f95b6346333031907ce50f05bb8e49 | Kyle Mayes | 2022-09-22T09:33:49 | Simplify feature check for EntityKind change | diff --git a/src/lib.rs b/src/lib.rs
index 26e21b3..c101ce6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -490,9 +490,9 @@ cenum! {
const CXCursor_OMPParallelMaskedTaskLoopDirective = 303,
/// Only produced by `libclang` 15.0 and later.
const CXCursor_OMPParallelMaskedTaskLoopSimdDirective = 30... | 1 | 2 | 2 |
caf167c3cd6688988ed3191dc3ebc17665009475 | Anders Langlands | 2022-09-15T09:00:27 | bump crate minor version | diff --git a/Cargo.toml b/Cargo.toml
index e0344de..b35cde3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
name = "clang-sys"
authors = ["Kyle Mayes <kyle@mayeses.com>"]
-version = "1.3.3"
+version = "1.4.0"
readme = "README.md"
license = "Apache-2.0" | 1 | 1 | 1 |
1e2d70518755ed1a0413c283221a976faf4ff5fe | Anders Langlands | 2022-09-15T08:57:46 | add clang 16 additions | diff --git a/Cargo.toml b/Cargo.toml
index 772d25b..e0344de 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,6 +35,7 @@ clang_12_0 = ["clang_11_0"]
clang_13_0 = ["clang_12_0"]
clang_14_0 = ["clang_13_0"]
clang_15_0 = ["clang_14_0"]
+clang_16_0 = ["clang_15_0"]
runtime = ["libloading"]
static = []
diff --git a/src... | 2 | 7 | 0 |
7b029d8e2d50914773d71f0d41ccaf277c3e5c41 | Anders Langlands | 2022-09-15T08:54:53 | add clang 15 additions | diff --git a/Cargo.toml b/Cargo.toml
index 01aa222..772d25b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,6 +34,7 @@ clang_11_0 = ["clang_10_0"]
clang_12_0 = ["clang_11_0"]
clang_13_0 = ["clang_12_0"]
clang_14_0 = ["clang_13_0"]
+clang_15_0 = ["clang_14_0"]
runtime = ["libloading"]
static = []
diff --git a/src... | 2 | 34 | 0 |
cf66c8251f3ece4b21235fa17e9cfa3ca0d40307 | Anders Langlands | 2022-09-15T08:38:44 | add CXCursorKind changes in 14 | diff --git a/Cargo.toml b/Cargo.toml
index b8875a5..01aa222 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,6 +33,7 @@ clang_10_0 = ["clang_9_0"]
clang_11_0 = ["clang_10_0"]
clang_12_0 = ["clang_11_0"]
clang_13_0 = ["clang_12_0"]
+clang_14_0 = ["clang_13_0"]
runtime = ["libloading"]
static = []
diff --git a/src/... | 2 | 7 | 0 |
6a4a072c5b76ca810e55449298fe48b3d2a1ed46 | Nick Desaulniers | 2022-05-28T16:30:06 | Check CLANG_PATH is not a directory BEFORE trying to execute it (#142)
If $CLANG_PATH is set, but doesn't point to a clang binary (but say, the
source code directory of clang) bindgen will fail with cryptic errors
pointing back to clang-sys:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value... | diff --git a/src/support.rs b/src/support.rs
index ff38d39..2b27cc0 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -58,7 +58,10 @@ impl Clang {
/// `x86_64-unknown-linux-gnu-clang` for the above example).
pub fn find(path: Option<&Path>, args: &[String]) -> Option<Clang> {
if let Ok(path) = env:... | 1 | 4 | 1 |
da1d08897f947302b9351c93c5e445a7b4c3df8e | James MacMahon | 2022-05-18T05:27:02 | Support illumos / omnios during libclang search (#141)
Search for libclang under /opt/ooce/ when running on an illumos
derivative. | diff --git a/build/common.rs b/build/common.rs
index bc720ca..735d5da 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -172,6 +172,12 @@ const DIRECTORIES_WINDOWS: &[&str] = &[
"C:\\Users\\*\\scoop\\apps\\llvm\\current\\bin",
];
+/// `libclang` directory patterns for illumos
+const DIRECTORIES_ILLUMOS: &[&... | 1 | 8 | 0 |
14560fa4a2643ea40f13cd515267d7230b0aaf7a | Kyle Mayes | 2021-11-05T15:52:27 | Update target Clang version in docs.rs | diff --git a/Cargo.toml b/Cargo.toml
index 1a162df..97d2fc7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,4 +49,4 @@ glob = "0.3"
[package.metadata.docs.rs]
-features = ["clang_11_0", "runtime"]
+features = ["clang_13_0", "runtime"] | 1 | 1 | 1 |
25891b930bb0a5c971b721fa647b113247e45e8d | Kyle Mayes | 2021-11-05T15:51:44 | Refactor build script | diff --git a/build.rs b/build.rs
index 5c940a1..bfaaff6 100644
--- a/build.rs
+++ b/build.rs
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
-//! Finds `libclang` static or dynamic libraries and links to them.
+//! Finds `libclang` static or shared libraries and links to them.
//!
//! # Environment Variab... | 4 | 218 | 173 |
cd3312b9e15bcee10974f0c1bc04200c2012f023 | Kyle Mayes | 2021-11-04T18:06:56 | Update license headers | diff --git a/build.rs b/build.rs
index cf5baa3..5c940a1 100644
--- a/build.rs
+++ b/build.rs
@@ -1,16 +1,4 @@
-// Copyright 2016 Kyle Mayes
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the Licens... | 7 | 7 | 91 |
2e7d608ad27cabc832897d24345266dd69cce006 | Kyle Mayes | 2021-10-31T20:35:38 | Fix ordering of Clang functions | diff --git a/src/lib.rs b/src/lib.rs
index 90f3706..a785499 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1764,12 +1764,6 @@ link! {
/// Only available on `libclang` 3.7 and later.
#[cfg(feature = "clang_3_7")]
pub fn clang_Cursor_getOffsetOfField(cursor: CXCursor) -> c_longlong;
- /// Only available o... | 1 | 22 | 22 |
541325c7dfb87d7b0305434135515f927b3cb7aa | Jessica Hamilton | 2021-10-31T20:15:13 | Add support for the Haiku operating system (#136) | diff --git a/Cargo.toml b/Cargo.toml
index e04a103..ac8ce47 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
name = "clang-sys"
authors = ["Kyle Mayes <kyle@mayeses.com>"]
-version = "1.2.2"
+version = "1.2.3"
readme = "README.md"
license = "Apache-2.0"
diff --git a/build/common.rs b/build/common.rs
ind... | 4 | 17 | 2 |
ec7b0153d954ad3ef27ceff0d8c32ccfb3c10737 | Kyle Mayes | 2021-09-03T03:36:27 | Fix clippy warnings and remove try_opt! macro | diff --git a/build/dynamic.rs b/build/dynamic.rs
index c15973c..156afe4 100644
--- a/build/dynamic.rs
+++ b/build/dynamic.rs
@@ -90,8 +90,8 @@ fn validate_header(path: &Path) -> Result<(), String> {
/// Returns the components of the version in the supplied `libclang` shared
// library filename.
fn parse_version(file... | 3 | 15 | 31 |
d09fe5de138e1f486109e976d80e406ff152f67d | Kiron | 2021-08-22T05:00:49 | PATH env var might not be set
Some build systems (e.g. Bazel) do not necessarily set the PATH
environment variable. | diff --git a/src/support.rs b/src/support.rs
index 4e698ff..3019fb2 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -117,7 +117,9 @@ impl Clang {
}
}
- paths.extend(env::split_paths(&env::var("PATH").unwrap()));
+ if let Ok(path) = env::var("PATH") {
+ paths.extend(e... | 1 | 3 | 1 |
9a6091e0d30dd4f6488cc96f932018874e2d9267 | Jalal El Mansouri | 2021-04-27T22:31:11 | Add Scoop support on windows
[Scoop](https://github.com/lukesampson/scoop) is a popular command-line installer used on Windows with a behavior similar to Homebrew on MacOS. It seems reasonable to have support for the default user installation path.
Instead of fetching the current user and restrict the search to it, I... | diff --git a/build/common.rs b/build/common.rs
index f06aff5..b73ec8c 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -49,6 +49,9 @@ const DIRECTORIES_WINDOWS: &[&str] = &[
// LLVM + Clang can be installed as a component of Visual Studio.
// https://github.com/KyleMayes/clang-sys/issues/121
"C:\\Pr... | 1 | 3 | 0 |
276a00dfa241ddc7ab5b9cfd33499937e830c4c2 | Kyle Mayes | 2021-04-05T22:16:26 | Run rustfmt | diff --git a/build/common.rs b/build/common.rs
index 265a0cf..46808d9 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -61,15 +61,17 @@ thread_local! {
fn run_command(name: &str, command: &str, arguments: &[&str]) -> Option<String> {
macro_rules! error {
($error:expr) => {{
- COMMAND_ERRO... | 1 | 22 | 12 |
ad77c3f41472bd2433d366755e8cad2027a20cbb | j-vanderstoep | 2021-02-19T23:56:56 | Upgrade libloading dep to 0.7.0 (#124)
Libloading 0.7 requires an unsafe wrapper around Library::new().
Uprev to version 1.1.1.
Co-authored-by: Jeff Vander Stoep <jeffv@google.com> | diff --git a/Cargo.toml b/Cargo.toml
index 0b68df7..f7abf3c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
name = "clang-sys"
authors = ["Kyle Mayes <kyle@mayeses.com>"]
-version = "1.1.0"
+version = "1.1.1"
readme = "README.md"
license = "Apache-2.0"
@@ -39,7 +39,7 @@ static = []
glob = "0.3"
lib... | 2 | 14 | 12 |
a3b2954b38f23839f15b9ab5294c38013e182f3a | Kyle Mayes | 2020-11-17T07:20:42 | Expand explanatory comment about tiebreaking | diff --git a/build/dynamic.rs b/build/dynamic.rs
index 87b2832..c15973c 100644
--- a/build/dynamic.rs
+++ b/build/dynamic.rs
@@ -181,7 +181,20 @@ fn search_libclang_directories(runtime: bool) -> Result<Vec<(PathBuf, String, Ve
pub fn find(runtime: bool) -> Result<(PathBuf, String), String> {
search_libclang_direc... | 1 | 14 | 1 |
231917074a32b46597d9fda0793c4ff8cf45ea7a | Michael Hackner | 2020-11-15T23:03:30 | Preserve order of searched libclang directories when breaking ties
`max_by_key` unintuitively picks the last element in case of a tie, but
we want the first since the collection we're iterating over is in
priority order. | diff --git a/build/dynamic.rs b/build/dynamic.rs
index 8a9e5d3..87b2832 100644
--- a/build/dynamic.rs
+++ b/build/dynamic.rs
@@ -181,6 +181,7 @@ fn search_libclang_directories(runtime: bool) -> Result<Vec<(PathBuf, String, Ve
pub fn find(runtime: bool) -> Result<(PathBuf, String), String> {
search_libclang_direct... | 1 | 1 | 0 |
1ba93cf719111ac1947e7d8bf2aeff1bb9bbf764 | Michael Hackner | 2020-11-15T22:59:19 | Trim trailing newline from command output before converting to path
Otherwise the '\n' is interpreted as part of the path, which doesn't
exist. | diff --git a/src/support.rs b/src/support.rs
index f061275..2441487 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -84,11 +84,11 @@ impl Clang {
paths.push(path.into());
}
if let Ok(path) = run_llvm_config(&["--bindir"]) {
- paths.push(path.into());
+ paths.push... | 1 | 2 | 2 |
933c64700e389251b8493cd5ca0163a763489604 | Kyle Mayes | 2020-08-16T16:50:35 | Fix documentation link in Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index 42a2582..93f2156 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ license = "Apache-2.0"
description = "Rust bindings for libclang."
-documentation = "https://kylemayes.github.io/clang-sys/runtime/clang_sys"
+documentation = "https://docs.rs/clang-sys"
reposito... | 1 | 1 | 1 |
3edf08541e61be25278a98be66564f2fca6b65a7 | Oscar Walter | 2020-07-14T03:28:56 | Update libloading to version 0.6 (#112) | diff --git a/Cargo.toml b/Cargo.toml
index 79438ab..9e91ebb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,7 @@ static = []
glob = "0.3"
libc = { version = "0.2.39", default-features = false }
-libloading = { version = "0.5", optional = true }
+libloading = { version = "0.6", optional = true }
[build-depe... | 1 | 1 | 1 |
51d366b4e6f3d432295b414f8988c40718990653 | Kyle Mayes | 2020-07-04T16:36:42 | Fix Rust and Clippy warnings (#110) | diff --git a/build/static.rs b/build/static.rs
index bacd4ad..bd18ae1 100644
--- a/build/static.rs
+++ b/build/static.rs
@@ -90,7 +90,7 @@ fn find() -> PathBuf {
};
let files = common::search_libclang_directories(&[name.into()], "LIBCLANG_STATIC_PATH");
- if let Some((directory, _)) = files.into_iter().n... | 3 | 7 | 6 |
7179ae689b2ed821e92a94e831c783f3ac1138a8 | Kyle Mayes | 2020-07-03T16:31:43 | Remove gte_clang features (#108) | diff --git a/Cargo.toml b/Cargo.toml
index 5a35957..727290c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,27 +19,16 @@ build = "build.rs"
[features]
clang_3_5 = []
-clang_3_6 = ["gte_clang_3_6"]
-clang_3_7 = ["gte_clang_3_6", "gte_clang_3_7"]
-clang_3_8 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8"]
-clang... | 2 | 113 | 124 |
9241477063c27c2505597b5af1a61be3f6fa6c7c | Kyle Mayes | 2020-03-31T16:37:46 | Add comments for conditional items | diff --git a/src/lib.rs b/src/lib.rs
index ac316de..c0994ee 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -524,6 +524,7 @@ cenum! {
}
cenum! {
+ /// Only available on `libclang` 5.0 and later.
#[cfg(feature = "gte_clang_5_0")]
enum CXCursor_ExceptionSpecificationKind {
const CXCursor_ExceptionSp... | 2 | 138 | 12 |
3c9c0e24f1b81c897be6a1d274653204ec2a3cd8 | Kyle Mayes | 2020-03-31T15:50:13 | Format attributes in macros | diff --git a/src/lib.rs b/src/lib.rs
index 2ae41b8..ac316de 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -524,7 +524,7 @@ cenum! {
}
cenum! {
- #[cfg(feature="gte_clang_5_0")]
+ #[cfg(feature = "gte_clang_5_0")]
enum CXCursor_ExceptionSpecificationKind {
const CXCursor_ExceptionSpecificationKind_... | 2 | 97 | 97 |
2ed543f084bbd0ca796f817be0c344b354f9faad | Emilio Cobos Álvarez | 2020-03-10T03:26:18 | Reduce minimum version of libc and libloading (#103)
Non-required version updates is preventing use of updated libclang in Firefox. | diff --git a/Cargo.toml b/Cargo.toml
index fd1d346..89113c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
name = "clang-sys"
authors = ["Kyle Mayes <kyle@mayeses.com>"]
-version = "0.29.1"
+version = "0.29.2"
readme = "README.md"
license = "Apache-2.0"
@@ -47,8 +47,8 @@ static = []
[dependencies]
... | 1 | 3 | 3 |
dbacf3281e60a15920c70d9af44a38f20af7ac35 | Lee Mracek | 2020-03-06T23:04:23 | Add additional libclang pattern (#102) | diff --git a/build/dynamic.rs b/build/dynamic.rs
index 7014081..2054ba0 100644
--- a/build/dynamic.rs
+++ b/build/dynamic.rs
@@ -122,6 +122,7 @@ fn search_libclang_directories(runtime: bool) -> Result<Vec<(PathBuf, String, Ve
// runtime.
if runtime {
files.push("libclang.so.*".into());
+ ... | 1 | 1 | 0 |
9ee948b98d2f6abdfc6ce2fd7e7c86364511f774 | Kyle Mayes | 2020-02-18T02:28:55 | Fix clippy warnings | diff --git a/build/dynamic.rs b/build/dynamic.rs
index d1a162a..7014081 100644
--- a/build/dynamic.rs
+++ b/build/dynamic.rs
@@ -198,7 +198,7 @@ pub fn link() {
// Find the `libclang` stub static library required for the MSVC
// toolchain.
let lib = if !directory.ends_with("bin") {
- ... | 2 | 3 | 3 |
1047fc6f2ba92532aaf9509fbe29b3c29eadd72d | Martijn Berger | 2020-02-18T01:27:26 | Add support for clang 9.0.x (#101) | diff --git a/Cargo.toml b/Cargo.toml
index 58d125c..7868a53 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
name = "clang-sys"
authors = ["Kyle Mayes <kyle@mayeses.com>"]
-version = "0.28.1"
+version = "0.29.0"
readme = "README.md"
license = "Apache-2.0"
@@ -28,6 +28,7 @@ clang_5_0 = ["gte_clang_3_6", ... | 2 | 32 | 4 |
c88ed3bd2ad446b5c7190d8f33147ed8577f6aff | Lars Wrenger | 2020-02-18T01:26:33 | Add missing CompileCommand getNumMappedSources (#99) | diff --git a/src/lib.rs b/src/lib.rs
index be4092f..96909d2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1653,6 +1653,7 @@ link! {
#[cfg(feature="gte_clang_3_8")]
pub fn clang_CompileCommand_getMappedSourcePath(command: CXCompileCommand, index: c_uint) -> CXString;
pub fn clang_CompileCommand_getNumArgs(... | 1 | 1 | 0 |
e3a9fb35d8c10663518538fa48a3e135ca6157f5 | Kyle Mayes | 2019-07-28T19:24:35 | Refactor | diff --git a/build.rs b/build.rs
index b9aee65..17a398f 100644
--- a/build.rs
+++ b/build.rs
@@ -77,7 +77,7 @@ fn main() {
}
if let Ok(output) = common::run_llvm_config(&["--includedir"]) {
- let directory = Path::new(output.trim_right());
+ let directory = Path::new(output.trim_end());
... | 7 | 117 | 110 |
75ee92acab5e0a082505ee567770f2f10e8130c7 | Kyle Mayes | 2019-07-28T18:51:27 | Run rustfmt | diff --git a/build.rs b/build.rs
index bf4feee..b9aee65 100644
--- a/build.rs
+++ b/build.rs
@@ -27,32 +27,38 @@
extern crate glob;
-use std::path::{Path};
+use std::path::Path;
-#[path="build/common.rs"]
+#[path = "build/common.rs"]
pub mod common;
-#[path="build/dynamic.rs"]
+#[path = "build/dynamic.rs"]
pub... | 8 | 203 | 120 |
a562e9a478b6bc3780adb0cbcdf6872d3d6aa57c | Igor Gnatenko | 2019-07-28T17:41:20 | Update glob to 0.3 (#90)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> | diff --git a/Cargo.toml b/Cargo.toml
index a168625..f65486b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -44,10 +44,10 @@ static = []
[dependencies]
-glob = "0.2.11"
+glob = "0.3"
libc = { version = "0.2.39", default-features = false }
libloading = { version = "0.5.0", optional = true }
[build-dependencies]
... | 2 | 4 | 4 |
77af41fda4c24d4073606ed44c582670d89961b6 | B YI | 2019-03-26T23:10:38 | Add lib64 path search on Linux (#88)
The libclang.so is located at `/usr/lib64/llvm/7/lib64/libclang.so` on my Gentoo linux, where`/usr/lib64/llvm/7/` can be obtained by `llvm-config --prefix`. It would be better to also search `lib64` subdirectory, as `lib` subdirectory does not exist on my system. | diff --git a/build/common.rs b/build/common.rs
index 9e8e7fb..44e58e0 100644
--- a/build/common.rs
+++ b/build/common.rs
@@ -28,7 +28,7 @@ const DIRECTORIES_LINUX: &[&str] = &[
"/usr/local/lib*",
"/usr/local/lib*/*",
"/usr/local/lib*/*/*",
- "/usr/local/llvm*/lib",
+ "/usr/local/llvm*/lib*",
];
... | 1 | 2 | 1 |
046a0875b192baf15961a87fcf809aa76bb9442a | Emilio Cobos Álvarez | 2018-12-29T19:02:20 | Include shared library path in SharedLibrary struct (#86)
Kept private, but useful for debugging and logging purposes. | diff --git a/src/link.rs b/src/link.rs
index 5dc875e..b32577c 100644
--- a/src/link.rs
+++ b/src/link.rs
@@ -41,6 +41,7 @@ macro_rules! link {
($($(#[cfg($cfg:meta)])* pub fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*;)+) => (
use std::cell::{RefCell};
use std::sync::{Arc};
+ ... | 1 | 9 | 3 |
b8c62931b8026b24a9eadfc3ab628faf7d6f60fa | Reyk Floeter | 2018-10-06T16:34:53 | Add support for versioned libraries on BSDs (#82)
* OpenBSD uses libclang.so.x.x instead of libclang-x.x.so
* Use libNAME.so.X.X on BSDs only, create -lNAME string correctly | diff --git a/build/dynamic.rs b/build/dynamic.rs
index efea342..b43aaa0 100644
--- a/build/dynamic.rs
+++ b/build/dynamic.rs
@@ -100,12 +100,18 @@ fn parse_version(filename: &str) -> Vec<u32> {
fn search_libclang_directories() -> Result<Vec<(PathBuf, String, Vec<u32>)>, String> {
let mut files = vec![format!("{}c... | 1 | 13 | 3 |
3857f95b9ea20aae6f8dde93d0ab4790dc08e65c | Kyle Mayes | 2018-06-09T17:10:45 | Fix clippy warnings | diff --git a/build.rs b/build.rs
index a612fcf..0ffc616 100644
--- a/build.rs
+++ b/build.rs
@@ -212,7 +212,7 @@ fn find(library: Library, files: &[String], env: &str) -> Result<PathBuf, String
// Search the `LD_LIBRARY_PATH` directories.
if let Ok(path) = env::var("LD_LIBRARY_PATH") {
- for director... | 2 | 2 | 7 |
dd3acd28398ec6a2d4fa4938d70fc4e053389af5 | Kyle Mayes | 2018-06-09T16:58:33 | Remove clippy dependency | diff --git a/Cargo.toml b/Cargo.toml
index 59f2bb9..6cecd8c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -44,10 +44,6 @@ glob = "0.2.11"
libc = "0.2.39"
libloading = { version = "0.5.0", optional = true }
-clippy = { version = "0.0.*", optional = true }
-
[build-dependencies]
glob = "0.2.11"
-
-clippy = { versio... | 4 | 2 | 13 |
1aa221e1cf026b49963adf5962ee2d402f0f89e8 | Tamir Duberstein | 2017-12-15T18:59:01 | Include original errors in error messages
In my case, this produced the error
Unable to find libclang: "the `libclang` shared library at "..." could
not be opened: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20\' not
found (required by ...)"
which I needed in order to figure out what was wrong. | diff --git a/src/link.rs b/src/link.rs
index 8d25bbf..38a8c06 100644
--- a/src/link.rs
+++ b/src/link.rs
@@ -118,8 +118,8 @@ macro_rules! link {
mod build;
let file = try!(build::find_shared_library());
- let library = libloading::Library::new(&file).map_err(|_| {
- ... | 2 | 3 | 3 |
74740291999aa2fe1fe27c5554ed83701cdb9f1b | Kyle Mayes | 2017-11-24T19:41:50 | Fix clippy warnings | diff --git a/build.rs b/build.rs
index af85c1e..e9050b8 100644
--- a/build.rs
+++ b/build.rs
@@ -103,7 +103,7 @@ fn run_llvm_config(arguments: &[&str]) -> Result<String, String> {
}
/// Backup search directory globs for FreeBSD and Linux.
-const SEARCH_LINUX: &'static [&'static str] = &[
+const SEARCH_LINUX: &[&str... | 2 | 5 | 4 |
5a8b7ed8172e72d8225b8354b24b6df20c824d99 | Emilio Cobos Álvarez | 2017-11-24T19:03:20 | Work around a compiler bug (#69)
* link: derive Default instead of using unsafe.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* link: Work around a rust miscompilation bug.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1420301 | diff --git a/src/link.rs b/src/link.rs
index 543a5a5..8d25bbf 100644
--- a/src/link.rs
+++ b/src/link.rs
@@ -24,7 +24,10 @@ macro_rules! link {
#[cfg($cfg)]
pub fn $name(library: &mut super::SharedLibrary) {
let symbol = unsafe { library.library.get(stringify!($name).as_bytes()) }.ok();
-... | 1 | 5 | 8 |
c6bb4b85535ee7d4991ab5605729986a2a19d3e3 | Emilio Cobos Álvarez | 2017-10-09T22:10:12 | Replace usage of bitflags with constants
Using bitflags for FFI is unsound in linux32, and it causes crashes like
https://bugzilla.mozilla.org/show_bug.cgi?id=1406952.
This is pretty similar to
https://github.com/rust-lang-nursery/rust-bindgen/issues/439.
For this to be properly type safe we need to wait for
https:/... | diff --git a/Cargo.toml b/Cargo.toml
index 0c10925..0eacbc0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,6 @@ static = []
[dependencies]
-bitflags = "0.9.1"
glob = "0.2.11"
libc = "0.2.14"
libloading = { version = "0.4.0", optional = true }
diff --git a/src/lib.rs b/src/lib.rs
index 3b9fd55..991a8be 10... | 3 | 32 | 41 |
81b03d3d929886b2c8aefc726969d89eccdccebd | Kyle Mayes | 2017-09-15T00:05:57 | Fix clang_Cursor_isExternalSymbol parameters | diff --git a/src/lib.rs b/src/lib.rs
index f2c9ea2..3b9fd55 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1536,7 +1536,7 @@ link! {
pub fn clang_Cursor_isBitField(cursor: CXCursor) -> c_uint;
pub fn clang_Cursor_isDynamicCall(cursor: CXCursor) -> c_int;
#[cfg(feature="gte_clang_5_0")]
- pub fn clang_Cu... | 1 | 1 | 1 |
265db86c28d71ccf0edc8b382c527c6d41991073 | Kyle Mayes | 2017-09-03T15:56:12 | Refactor | diff --git a/build.rs b/build.rs
index a18e4a1..a31ecf6 100644
--- a/build.rs
+++ b/build.rs
@@ -253,16 +253,14 @@ pub fn find_shared_library() -> Result<PathBuf, String> {
/// Returns the name of an LLVM or Clang library from a path to such a library.
fn get_library_name(path: &Path) -> Option<String> {
- if le... | 1 | 14 | 15 |
10daa0109bfb9d7a7fa039c98e50ef113317216d | Kyle Mayes | 2017-09-03T15:38:50 | Fix warning on Windows | diff --git a/src/support.rs b/src/support.rs
index da3b94f..1e22308 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -138,7 +138,7 @@ fn is_executable(path: &Path) -> io::Result<bool> {
}
#[cfg(not(unix))]
-fn is_executable(path: &Path) -> io::Result<bool> {
+fn is_executable(_: &Path) -> io::Result<bool> {
... | 1 | 1 | 1 |
d5863ac3a99c9f1c3d0e34e6ea9aa31382976e60 | Kornel | 2017-09-03T15:38:10 | Add support for static linking on Windows (#63)
* Link LLVM according to its preferred --shared-mode
* Trim lib prefix only if present, MSVC libs don't always use it
* Support Windows libclang.lib name
* Don't worry about static lib flags on MSVC
* Support lib paths with spaces | diff --git a/build.rs b/build.rs
index 856f9a5..a18e4a1 100644
--- a/build.rs
+++ b/build.rs
@@ -253,7 +253,16 @@ pub fn find_shared_library() -> Result<PathBuf, String> {
/// Returns the name of an LLVM or Clang library from a path to such a library.
fn get_library_name(path: &Path) -> Option<String> {
- path.f... | 1 | 20 | 12 |
6fd4a8a71e584786acf9b8182dd8d15b6bde6111 | Kornel | 2017-09-03T15:29:17 | Link LLVM according to its preferred --shared-mode (#62) | diff --git a/build.rs b/build.rs
index 12145fd..856f9a5 100644
--- a/build.rs
+++ b/build.rs
@@ -310,9 +310,12 @@ fn link_static() {
}
// Specify required LLVM static libraries.
+ let llvm_supports_static = run_llvm_config(&["--shared-mode"])
+ .map(|mode|mode.trim()=="static").unwrap_or(false);
+... | 1 | 4 | 1 |
4a14f7f324f0d4df44f91f569a8eaa56d904d945 | Kornel | 2017-07-29T21:43:13 | Create dummy is_loaded function to emulate runtime API (#59) | diff --git a/src/link.rs b/src/link.rs
index fcce818..543a5a5 100644
--- a/src/link.rs
+++ b/src/link.rs
@@ -181,5 +181,10 @@ macro_rules! link {
macro_rules! link {
($($(#[cfg($cfg:meta)])* pub fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*;)+) => (
extern { $($(#[cfg($cfg)])* pub fn $name($... | 1 | 5 | 0 |
40a2eb75ff454943bcc4fd0ab22f4171e7c7b521 | Kyle Mayes | 2017-07-02T21:16:35 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index f2ef821..2418140 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@
name = "clang-sys"
authors = ["Kyle Mayes <kyle@mayeses.com>"]
-version = "0.18.0"
+version = "0.19.0"
readme = "README.md"
license = "Apache-2.0" | 1 | 1 | 1 |
a512f484ec817242dd392b663c1005c7f1a6b73c | Kyle Mayes | 2017-07-02T21:16:00 | Bump bitflags version | diff --git a/Cargo.toml b/Cargo.toml
index 5f05987..f2ef821 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,7 +35,7 @@ static = []
[dependencies]
-bitflags = "0.8.0"
+bitflags = "0.9.1"
glob = "0.2.11"
libc = "0.2.14"
libloading = { version = "0.4.0", optional = true }
diff --git a/src/lib.rs b/src/lib.rs
index... | 2 | 94 | 94 |
ed6e15f734324800fec35abaf2c1b78fedda6441 | Kyle Mayes | 2017-07-02T21:03:59 | Fix tests | diff --git a/tests/lib.rs b/tests/lib.rs
index 6e2e73c..6c82a4e 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -41,6 +41,6 @@ fn test() {
#[test]
fn test_support() {
- let clang = support::Clang::find(None).unwrap();
+ let clang = support::Clang::find(None, &[]).unwrap();
println!("{:?}", clang);
} | 1 | 1 | 1 |
a8b11597b095701dceedecc1a3768aee5476166d | Shing Lyu | 2017-07-02T21:01:53 | Allow passing additional arguments to the Clang executable (#57) | diff --git a/src/support.rs b/src/support.rs
index 5b5481a..da3b94f 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -59,10 +59,10 @@ pub struct Clang {
impl Clang {
//- Constructors -----------------------------
- fn new(path: PathBuf) -> Clang {
+ fn new(path: PathBuf, args: &[String]) -> Clang {
... | 1 | 10 | 8 |
6720ac0cac5c153516803b07f8d440dd40c3c621 | Kyle Mayes | 2017-05-17T03:35:56 | Refactor | diff --git a/build.rs b/build.rs
index e8c5ed5..1fb4557 100644
--- a/build.rs
+++ b/build.rs
@@ -39,34 +39,34 @@ use std::process::{Command};
use glob::{MatchOptions};
+/// Returns the components of the version appended to the supplied file.
+fn parse_version(file: &Path) -> Vec<u32> {
+ let string = file.to_st... | 1 | 24 | 24 |
5c40604be198a1fe62f301b14384ca7c5b584019 | Sebastien Marie | 2017-05-17T03:08:33 | Improve detection and selection of versioned libraries (#55)
- makes find() function to use a glob-pattern instead of hardcoded filename
- expands the pattern when searching if a directory contains the pattern
- returns only the library with the highest version
and finally uses it also for OpenBSD (OpenBSD doesn'... | diff --git a/build.rs b/build.rs
index 08282ac..e8c5ed5 100644
--- a/build.rs
+++ b/build.rs
@@ -41,7 +41,32 @@ use glob::{MatchOptions};
/// Returns a path to one of the supplied files if such a file can be found in the supplied directory.
fn contains<D: AsRef<Path>>(directory: D, files: &[String]) -> Option<PathB... | 1 | 28 | 4 |
12e4803307f0a06dd7f664d2a5cf340a9691069b | Kyle Mayes | 2017-05-08T16:07:54 | Refactor | diff --git a/src/support.rs b/src/support.rs
index ef74373..5b5481a 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -132,9 +132,9 @@ fn is_executable(path: &Path) -> io::Result<bool> {
use libc;
use std::ffi::CString;
use std::os::unix::ffi::OsStrExt;
- let cpath = CString::new(path.as_os_str().as... | 1 | 3 | 3 |
004ca7a5651f0406583584739893084911f269b1 | Kyle Mayes | 2017-05-08T15:41:37 | Fix clippy warnings | diff --git a/build.rs b/build.rs
index 8033cf3..08282ac 100644
--- a/build.rs
+++ b/build.rs
@@ -19,9 +19,9 @@
//! This build script can make use of several environment variables to help it find the required
//! static or dynamic libraries.
//!
-//! * LLVM_CONFIG_PATH - provides a path to an `llvm-config` executable... | 1 | 3 | 3 |
653aea9078190dd671bb9ca350e6936af25af33b | Tanner Rogalsky | 2017-05-02T18:47:29 | Bump libloading version (#53) | diff --git a/Cargo.toml b/Cargo.toml
index f605319..50c8fe1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,7 @@ static = []
bitflags = "0.8.0"
glob = "0.2.11"
libc = "0.2.14"
-libloading = { version = "0.3.0", optional = true }
+libloading = { version = "0.4.0", optional = true }
clippy = { version = "0.0.... | 1 | 1 | 1 |
8cd1df79eadbcdc513dd5e7d437e8100870be81f | Kyle Mayes | 2017-04-28T22:19:35 | Refactor | diff --git a/build.rs b/build.rs
index a2b079d..8033cf3 100644
--- a/build.rs
+++ b/build.rs
@@ -12,7 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-//! Finds and links to the required `libclang` libraries.
+//! Finds the required `libclang` libra... | 1 | 17 | 14 |
f94833c175e5be77582bf56f3550ff441af1025d | Emilio Cobos Álvarez | 2017-04-28T22:10:45 | Fix usage of some versioned libraries on Linux (#51)
Add `libclang.so.1` to the files searched for on Linux | diff --git a/build.rs b/build.rs
index c275424..a2b079d 100644
--- a/build.rs
+++ b/build.rs
@@ -216,6 +216,11 @@ pub fn find_shared_library() -> Result<PathBuf, String> {
files.push("libclang.dll".into());
}
files.push(format!("{}clang{}", env::consts::DLL_PREFIX, env::consts::DLL_SUFFIX));
+ if ... | 1 | 5 | 0 |
5dc58da157feeb8c0344d446241eed53ea60d8e5 | Kyle Mayes | 2017-03-01T03:59:38 | Update documentation comments | diff --git a/src/lib.rs b/src/lib.rs
index a6301cd..8c05033 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -57,7 +57,7 @@ pub type CXInclusionVisitor = extern fn(CXFile, *mut CXSourceLocation, c_uint, C
// cenum! ________________________________________
-/// Defines a type-safe C enum as a series of constants.
+/// D... | 1 | 1 | 1 |
471a0c9d271a26b417d867d23d38119ba9e24f60 | Kyle Mayes | 2017-02-19T16:19:55 | Fix clippy warnings | diff --git a/build.rs b/build.rs
index ba0a733..ba280b5 100644
--- a/build.rs
+++ b/build.rs
@@ -14,6 +14,8 @@
//! Finds and links to the required `libclang` libraries.
+#![allow(unused_attributes)]
+
#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]
#![cfg_attr(feat... | 2 | 4 | 1 |
f1ca803065808573001628c341215ee4a033dcdc | Kyle Mayes | 2017-02-19T16:15:45 | Remove lazy_static dependency | diff --git a/Cargo.toml b/Cargo.toml
index af52c33..b22833e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,14 +28,13 @@ gte_clang_3_7 = []
gte_clang_3_8 = []
gte_clang_3_9 = []
-runtime = ["lazy_static", "libloading"]
+runtime = ["libloading"]
static = []
[dependencies]
bitflags = "0.7.0"
glob = "0.2.11"
-... | 2 | 1 | 5 |
93a4a5d32fb240470f5ae183b0389149b26dd8aa | NAKASHIMA, Makoto | 2017-02-22T20:17:57 | Improve clang searching (#47)
Make `Clang::find` not return a directory or non-executable file. | diff --git a/src/support.rs b/src/support.rs
index a639f88..8bc72f9 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -14,7 +14,7 @@
//! Provides helper functionality.
-use std::env;
+use std::{io, env};
use std::process::{Command};
use std::path::{Path, PathBuf};
@@ -119,12 +119,29 @@ fn find(directory: &Pa... | 1 | 19 | 2 |
93eee7613c6af38a61dda4cfc453979362fdc8d7 | Kyle Mayes | 2017-01-30T03:59:50 | Fix clippy warnings | diff --git a/src/support.rs b/src/support.rs
index 83fd937..a639f88 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -141,7 +141,8 @@ fn run_clang(path: &Path, arguments: &[&str]) -> (String, String) {
/// Runs `llvm-config`, returning the `stdout` output if successful.
fn run_llvm_config(arguments: &[&str]) -> ... | 1 | 2 | 1 |
d92300738fb48d6f0cb910c9a835403c3eeb9b6d | Kyle Mayes | 2016-12-14T01:42:59 | Refactor | diff --git a/src/link.rs b/src/link.rs
index af3983f..7155182 100644
--- a/src/link.rs
+++ b/src/link.rs
@@ -51,7 +51,7 @@ macro_rules! link {
}
}
- /// A dynamically loaded instance of the libclang library.
+ /// A dynamically loaded instance of the `libclang` library.
#[... | 1 | 63 | 53 |
b75ed5f11077880c7445ac8d6e9e549744ab7d33 | Kyle Mayes | 2016-12-14T01:06:18 | Fix warnings | diff --git a/build.rs b/build.rs
index 65cc4e6..ba0a733 100644
--- a/build.rs
+++ b/build.rs
@@ -209,6 +209,7 @@ fn get_clang_libraries<P: AsRef<Path>>(directory: P) -> Vec<String> {
}
/// Find and link to `libclang` statically.
+#[cfg_attr(feature="runtime", allow(dead_code))]
fn link_static() {
let file = f... | 1 | 3 | 0 |
3be73ce2babb2e9e81af32dbafdd2b8453536e00 | Emilio Cobos Álvarez | 2016-12-14T01:01:30 | Improve the runtime linking API (#45)
This allows the runtime API:
* To be queried.
* To be reusable across threads.
I need the first to use it on bindgen. The second is not needed right now, but
it's nice to have.
The querying API is really similar to what the `gl` bindings crate uses. | diff --git a/src/link.rs b/src/link.rs
index 4cf5b64..af3983f 100644
--- a/src/link.rs
+++ b/src/link.rs
@@ -20,39 +20,29 @@
#[cfg(feature="runtime")]
macro_rules! link {
- (@IMPL: #[cfg($cfg:meta)] fn $name:ident($($pname:ident: $pty:ty), *) $(-> $ret:ty)*) => (
+ (@LOAD: #[cfg($cfg:meta)] fn $name:ident($($... | 1 | 84 | 54 |
238d75a57f3b97fcb880d5b345e6b64b9bba756d | Kyle Mayes | 2016-12-07T05:44:01 | Refactor build.rs | diff --git a/build.rs b/build.rs
index e60619e..65cc4e6 100644
--- a/build.rs
+++ b/build.rs
@@ -33,8 +33,7 @@ use glob::{MatchOptions};
// * LIBCLANG_PATH - provides a path to a directory containing a `libclang` shared library
// * LIBCLANG_STATIC_PATH - provides a path to a directory containing LLVM and Clang stati... | 1 | 98 | 82 |
32671a24b76ab8a19732ed7da103f978ce5f9d99 | Xidorn Quan | 2016-12-07T04:50:58 | Support linking Clang from MSYS2's MinGW environment (#43)
* Locate stub static lib from related directory
Rather than calling find() again to search all available path. This
ensures that the correct stub library would be picked.
* Search bin dir for builtin search paths
This simplifies code and make it easi... | diff --git a/build.rs b/build.rs
index c3591b8..e60619e 100644
--- a/build.rs
+++ b/build.rs
@@ -21,6 +21,7 @@
extern crate glob;
use std::env;
+use std::fs;
use std::path::{Path, PathBuf};
use std::process::{Command};
@@ -32,9 +33,10 @@ use glob::{MatchOptions};
// * LIBCLANG_PATH - provides a path to a direc... | 2 | 68 | 54 |
2611290a13f5b4c6e59c58a9bf824e22cc9ea427 | Kyle Mayes | 2016-08-22T00:13:18 | Fix warnings | diff --git a/build.rs b/build.rs
index 5b28042..bdeab37 100644
--- a/build.rs
+++ b/build.rs
@@ -231,11 +231,11 @@ fn main() {
}
// Specify required system libraries.
- if(cfg!(target_os="linux")) {
+ if cfg!(target_os="linux") {
println!("-l ffi -l ncursesw -l stdc++ -l z... | 1 | 3 | 3 |
e381e88eba64cb3d9ead802f58c6e85e4335a844 | Jupp Müller | 2016-08-22T00:04:12 | Link against libc++ on FreeBSD and OS X (#40)
OSX and FreeBSD have both switched from using libstdc++ to using libc++
as their C++ standard library implementation a few years ago. This
change adjusts the link flags for both platforms accordingly. | diff --git a/build.rs b/build.rs
index 0be7a93..5b28042 100644
--- a/build.rs
+++ b/build.rs
@@ -231,10 +231,12 @@ fn main() {
}
// Specify required system libraries.
- if cfg!(any(target_os="freebsd", target_os="linux")) {
+ if(cfg!(target_os="linux")) {
println!("-l ffi ... | 1 | 5 | 3 |
54a00d5080b539e3f0a9e6d75076383877844f75 | Kyle Mayes | 2016-07-31T19:06:42 | Simplify build script | diff --git a/build.rs b/build.rs
index 72767f9..bac6bfc 100644
--- a/build.rs
+++ b/build.rs
@@ -37,11 +37,6 @@ fn contains<D: AsRef<Path>>(directory: D, file: &str) -> bool {
directory.as_ref().join(file).exists()
}
-/// Panics with a user friendly error message.
-fn error(file: &str, env: &str) -> ! {
- pa... | 1 | 17 | 26 |
4d43cf32609782f84c30c7143278e74fe938b7dd | Jean Pierre Dudey | 2016-07-31T18:45:32 | Implement Deref for opaque structs (#39) | diff --git a/src/lib.rs b/src/lib.rs
index 8406e77..961428b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -885,6 +885,7 @@ bitflags! {
//================================================
// Opaque ________________________________________
+//
macro_rules! opaque {
($name:ident) => (
@@ -897,6 +898,14 @@ macro_r... | 2 | 11 | 2 |
7e68b006eff5c215f62cf21e3854dda03c65dfab | Kyle Mayes | 2016-07-21T20:31:41 | Add documentation bindings (#35) | diff --git a/src/documentation.rs b/src/documentation.rs
new file mode 100644
index 0000000..480b38e
--- /dev/null
+++ b/src/documentation.rs
@@ -0,0 +1,114 @@
+// Copyright 2016 Kyle Mayes
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with th... | 2 | 117 | 0 |
1d86608cf7007a4895b70d3b55cd208a2c4d9947 | Kyle Mayes | 2016-07-18T08:07:34 | Refactor build.rs to use PathBuf | diff --git a/build.rs b/build.rs
index f9c37cf..f723feb 100644
--- a/build.rs
+++ b/build.rs
@@ -21,7 +21,7 @@
extern crate glob;
use std::env;
-use std::path::{Path};
+use std::path::{Path, PathBuf};
use std::process::{Command};
use glob::{MatchOptions};
@@ -82,28 +82,28 @@ const SEARCH_WINDOWS: &'static [&'st... | 1 | 22 | 22 |
babe8da8b67e98eab9a9830e34e373583a714951 | Kyle Mayes | 2016-07-17T13:58:20 | Fix Xcode search path parsing (#32) | diff --git a/src/support.rs b/src/support.rs
index 9b8b39b..891e82a 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -141,5 +141,6 @@ fn parse_search_paths(path: &Path, language: &str) -> Vec<PathBuf> {
let include_start = "#include <...> search starts here:";
let start = output.find(include_start).expect(... | 1 | 2 | 1 |
23fe702b4baca326cfb4563131a373dba7610724 | Xidorn Quan | 2016-07-18T05:19:08 | Search additional path on Windows (#34) | diff --git a/build.rs b/build.rs
index 26b671f..f9c37cf 100644
--- a/build.rs
+++ b/build.rs
@@ -88,6 +88,25 @@ fn find(file: &str, env: &str) -> Option<String> {
if contains(&directory, file) {
return Some(directory);
}
+ // On Windows, libclang.dll is usually put in bin directory... | 1 | 19 | 0 |
c10d884e41fca62f64f9888512e05b8d7c87f748 | Kyle Mayes | 2016-06-17T20:54:20 | Reformat | diff --git a/src/support.rs b/src/support.rs
index f324269..9b8b39b 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -139,8 +139,7 @@ fn parse_version(path: &Path) -> Option<CXVersion> {
fn parse_search_paths(path: &Path, language: &str) -> Vec<PathBuf> {
let output = run_clang(path, &["-E", "-x", language, "-... | 1 | 1 | 2 |
1872c70a9e59be45a7dc31ad8e07bcde31e74863 | Jesse A. Tov | 2016-06-17T20:52:54 | Fix for #29: Panic in support::Clang::find (#30)
* Added more informative panic messages for clang output parsing.
* Search for clang executables requires version to start with digit.
This is a fix for https://github.com/KyleMayes/clang-sys/issues/29 | diff --git a/src/support.rs b/src/support.rs
index 0a23424..f324269 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -77,7 +77,7 @@ impl Clang {
/// the system's `PATH` are searched.
pub fn find(path: Option<&Path>) -> Option<Clang> {
let default = format!("clang{}", env::consts::EXE_SUFFIX);
- ... | 1 | 5 | 3 |
e05986e5afdddc39a7c10109db17f5e7fb382425 | Kyle Mayes | 2016-06-01T00:13:45 | Add missing license headers | diff --git a/build.rs b/build.rs
index 6e844d5..26b671f 100644
--- a/build.rs
+++ b/build.rs
@@ -1,3 +1,17 @@
+// Copyright 2016 Kyle Mayes
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the Licens... | 2 | 28 | 0 |
feabcfb00de3dd467411cc06db05442847339025 | Kyle Mayes | 2016-05-31T22:13:25 | Fix clippy warnings | diff --git a/src/support.rs b/src/support.rs
index 09fbe39..770a5e5 100644
--- a/src/support.rs
+++ b/src/support.rs
@@ -105,7 +105,7 @@ fn parse_version_number(number: &str) -> Option<c_int> {
fn parse_version(path: &Path) -> Option<CXVersion> {
let output = run_clang(path, &["--version"], true);
let start ... | 1 | 1 | 1 |
ed2f690e41a1727feb44a1a51b1a23bf40a58af3 | Kyle Mayes | 2016-05-31T13:20:15 | Update Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index 9e985ed..a37dc7d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,16 +33,10 @@ static = []
bitflags = "0.7.0"
libc = "0.2.11"
-[dependencies.clippy]
-
-version = "0.0.69"
-optional = true
+clippy = { version = "0.0.*", optional = true }
[build-dependencies]
glob = "0.... | 1 | 2 | 8 |
0e34cab128ffd8bc8caa38573be85a4942d40b50 | Kyle Mayes | 2016-05-27T22:29:49 | Enable all clippy warnings | diff --git a/build.rs b/build.rs
index 686b185..6e844d5 100644
--- a/build.rs
+++ b/build.rs
@@ -3,7 +3,6 @@
#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]
#![cfg_attr(feature="clippy", warn(clippy))]
-#![cfg_attr(feature="clippy", allow(if_not_else, similar_names))]
... | 2 | 0 | 2 |
747a9bcedf97c339dc8ec45dbac6523acd56f6a2 | Kyle Mayes | 2016-05-27T22:21:14 | Reduce generality of backup search directory globs | diff --git a/build.rs b/build.rs
index 90707a4..686b185 100644
--- a/build.rs
+++ b/build.rs
@@ -43,17 +43,21 @@ fn run_llvm_config(arguments: &[&str]) -> Option<String> {
/// Backup search directory globs for FreeBSD and Linux.
const SEARCH_LINUX: &'static [&'static str] = &[
- "/usr/*",
- "/usr/*/*",
- "... | 1 | 10 | 6 |
21a84b54c75014db9df75135874867651c541db8 | Kyle Mayes | 2016-05-27T02:29:02 | Use globs to define backup search directories | diff --git a/build.rs b/build.rs
index 887a93c..3453b45 100644
--- a/build.rs
+++ b/build.rs
@@ -4,6 +4,8 @@ use std::env;
use std::path::{Path};
use std::process::{Command};
+use glob::{MatchOptions};
+
// Environment variables:
//
// * LLVM_CONFIG_PATH - provides a path to an `llvm-config` executable
@@ -11,8 ... | 1 | 29 | 28 |
3c5448572cbea386a14ee72bc2fb3b14e62c0e58 | Kyle Mayes | 2016-05-27T02:06:11 | Remove usage of MAIN_SEPARATOR | diff --git a/build.rs b/build.rs
index ae6a063..887a93c 100644
--- a/build.rs
+++ b/build.rs
@@ -1,7 +1,7 @@
extern crate glob;
use std::env;
-use std::path::{MAIN_SEPARATOR, Path};
+use std::path::{Path};
use std::process::{Command};
// Environment variables:
@@ -81,11 +81,11 @@ fn find(file: &str, env: &str) ... | 1 | 3 | 3 |
7ef4dd151cf3b041c3e7580d1ac4aec4d891d874 | Benedikt Steinbusch | 2016-05-26T21:27:36 | Add LLVM library search paths for FreeBSD ports (#24) | diff --git a/build.rs b/build.rs
index 9e2a7f3..a2dfad3 100644
--- a/build.rs
+++ b/build.rs
@@ -41,6 +41,11 @@ const SEARCH_LINUX: &'static [&'static str] = &[
"/usr/lib/llvm-3.6/lib",
"/usr/lib/llvm-3.5/lib",
"/usr/lib/llvm-3.4/lib",
+ "/usr/local/llvm38/lib",
+ "/usr/local/llvm37/lib",
+ "/us... | 1 | 5 | 0 |
01aceffd1b6e4d8642913a89b0343a24653fe31d | Kyle Mayes | 2016-05-25T20:48:17 | Fix linking for MSVC target (#23) | diff --git a/build.rs b/build.rs
index 93aa5e8..9e2a7f3 100644
--- a/build.rs
+++ b/build.rs
@@ -184,6 +184,22 @@ fn main() {
};
println!("cargo:rustc-link-search={}", directory);
- println!("cargo:rustc-link-lib=dylib=clang");
+
+ if cfg!(all(target_os="windows", target_env="msvc")) {... | 1 | 17 | 1 |
10f6ffe4b56912f5123a083eb356f03a15789e48 | Kyle Mayes | 2016-05-19T23:04:50 | Update Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index 80c2791..fbd4474 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ license = "Apache-2.0"
description = "Rust bindings for libclang."
-documentation = "https://kylemayes.github.io/clang-sys/all/clang_sys"
+documentation = "https://kylemayes.github.io/clang-sys/3_... | 1 | 1 | 1 |
6fda576f2074800159ac919d0d0c03ef37779a45 | Kyle Mayes | 2016-05-17T23:40:58 | Update crate-level documentation | diff --git a/src/lib.rs b/src/lib.rs
index e5fd36a..958732f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,20 +14,15 @@
//! Rust bindings for `libclang`.
//!
-//! ## Version Specific Documentation
+//! ## Supported Versions
//!
-//! * 3.5.x - [Documentation](https://kylemayes.github.io/clang-sys/3_5/clang_sys)
-/... | 1 | 5 | 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.