summaryrefslogtreecommitdiffstats
path: root/tools/llvm-config/llvm-config.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 19:34:23 +0000
committerdim <dim@FreeBSD.org>2012-08-15 19:34:23 +0000
commit721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch)
treeeacfc83d988e4b9d11114387ae7dc41243f2a363 /tools/llvm-config/llvm-config.cpp
parent2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff)
downloadFreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip
FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'tools/llvm-config/llvm-config.cpp')
-rw-r--r--tools/llvm-config/llvm-config.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 126542c..7edf5ec 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -190,9 +190,9 @@ int main(int argc, char **argv) {
sys::path::parent_path(CurrentPath)).str();
// Check to see if we are inside a development tree by comparing to possible
- // locations (prefix style or CMake style). This could be wrong in the face of
- // symbolic links, but is good enough.
- if (CurrentExecPrefix == std::string(LLVM_OBJ_ROOT) + "/" + LLVM_BUILDMODE) {
+ // locations (prefix style or CMake style).
+ if (sys::fs::equivalent(CurrentExecPrefix,
+ Twine(LLVM_OBJ_ROOT) + "/" + LLVM_BUILDMODE)) {
IsInDevelopmentTree = true;
DevelopmentTreeLayout = MakefileStyle;
@@ -204,11 +204,12 @@ int main(int argc, char **argv) {
} else {
ActiveObjRoot = LLVM_OBJ_ROOT;
}
- } else if (CurrentExecPrefix == std::string(LLVM_OBJ_ROOT)) {
+ } else if (sys::fs::equivalent(CurrentExecPrefix, LLVM_OBJ_ROOT)) {
IsInDevelopmentTree = true;
DevelopmentTreeLayout = CMakeStyle;
ActiveObjRoot = LLVM_OBJ_ROOT;
- } else if (CurrentExecPrefix == std::string(LLVM_OBJ_ROOT) + "/bin") {
+ } else if (sys::fs::equivalent(CurrentExecPrefix,
+ Twine(LLVM_OBJ_ROOT) + "/bin")) {
IsInDevelopmentTree = true;
DevelopmentTreeLayout = CMakeBuildModeStyle;
ActiveObjRoot = LLVM_OBJ_ROOT;
OpenPOWER on IntegriCloud