[PATCH] D69194: build: add clang-cl and clang++ symlinks in the build tree

2019-10-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd abandoned this revision.
compnerd added a comment.

I think I must have had something else in my tree, cause a clean build does 
build them.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69194/new/

https://reviews.llvm.org/D69194



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D69194: build: add clang-cl and clang++ symlinks in the build tree

2019-10-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

> Furthermore, the current build only installs the symbolic links in the 
> install tree, not the build tree

This isn't right ... if I look at my LLVM build tree, I have clang, clang++ and 
clang-cl symlinks, all pointing to the actual clang-10 binary.

Where are you seeing this?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69194/new/

https://reviews.llvm.org/D69194



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D69194: build: add clang-cl and clang++ symlinks in the build tree

2019-10-18 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision.
compnerd added reviewers: xiaobai, beanz, smeenai.
Herald added a subscriber: mgorny.
Herald added a project: clang.

This adds the clang-cl and clang++ symlinks.  Since there are no targets to 
depend on for this, we cannot force the creation of the symlinks.  Furthermore, 
the current build only installs the symbolic links in the install tree, not the 
build tree.  This enables the use of the clang driver without having adjust the 
C/C++ flags to add `--driver=...` to switch between driver modes.  Usage of 
this is present in Swift and there is some usage in lldb.


Repository:
  rC Clang

https://reviews.llvm.org/D69194

Files:
  tools/driver/CMakeLists.txt


Index: tools/driver/CMakeLists.txt
===
--- tools/driver/CMakeLists.txt
+++ tools/driver/CMakeLists.txt
@@ -49,6 +49,15 @@
   clangSerialization
   )
 
+if(CMAKE_VERSION VERSION_GREATER 3.7 OR NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  set(command create_symlink)
+else()
+  set(command copy)
+endif()
+add_custom_command(TARGET clang POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E ${command} $ 
$/clang-cl${CMAKE_EXECUTABLE_SUFFIX}
+  COMMAND ${CMAKE_COMMAND} -E ${command} $ 
$/clang++${CMAKE_EXECUTABLE_SUFFIX})
+
 if(WIN32 AND NOT CYGWIN)
   # Prevent versioning if the buildhost is targeting for Win32.
 else()


Index: tools/driver/CMakeLists.txt
===
--- tools/driver/CMakeLists.txt
+++ tools/driver/CMakeLists.txt
@@ -49,6 +49,15 @@
   clangSerialization
   )
 
+if(CMAKE_VERSION VERSION_GREATER 3.7 OR NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  set(command create_symlink)
+else()
+  set(command copy)
+endif()
+add_custom_command(TARGET clang POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E ${command} $ $/clang-cl${CMAKE_EXECUTABLE_SUFFIX}
+  COMMAND ${CMAKE_COMMAND} -E ${command} $ $/clang++${CMAKE_EXECUTABLE_SUFFIX})
+
 if(WIN32 AND NOT CYGWIN)
   # Prevent versioning if the buildhost is targeting for Win32.
 else()
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits