lang/cc: update README, remove bootstrap
This commit is contained in:
parent
85bde34f84
commit
53138760a0
2 changed files with 10 additions and 45 deletions
|
@ -12,14 +12,18 @@ generated glue code for iOS mobile apps.
|
|||
|
||||
** Installation
|
||||
~irony-server~ is required to use irony-mode's features auto-completion (among
|
||||
other things). To install it, run ~M-x irony-install-server~.
|
||||
other things).
|
||||
|
||||
This is all you need on Linux.
|
||||
To install it, run ~M-x irony-install-server~, which requires ~cmake~ and
|
||||
~libclang~.
|
||||
|
||||
*** MacOS
|
||||
libclang is required to build irony-server. On MacOS, the best way I know of to
|
||||
get it is:
|
||||
|
||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
||||
brew install llvm # may take a while!
|
||||
brew install cmake
|
||||
brew install llvm # 1gb+ installer: may take a while!
|
||||
#+END_SRC
|
||||
|
||||
*** Arch Linux
|
||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'arch) "yes")
|
||||
sudo pacman --needed --noconfirm -S clang cmake
|
||||
#+END_SRC
|
||||
|
|
|
@ -18,42 +18,3 @@
|
|||
(package! company-irony)
|
||||
(package! company-irony-c-headers))
|
||||
|
||||
;;
|
||||
(def-bootstrap! cc
|
||||
;; NOTE Untested
|
||||
(require! :lang cc t)
|
||||
(require 'irony)
|
||||
(unless (expand-file-name "bin/irony-server" irony-server-install-prefix)
|
||||
(pcase (doom-system-os)
|
||||
('arch
|
||||
(let (pkgs)
|
||||
(unless (executable-find "cmake")
|
||||
(push "cmake" pkgs))
|
||||
(unless (file-exists-p "/usr/lib/libclang.so")
|
||||
(push "clang" pkgs))
|
||||
(when pkgs
|
||||
(sudo "pacman --noconfirm -S %s" pkgs))))
|
||||
('debian) ;; TODO
|
||||
('macos
|
||||
(unless (executable-find "cmake")
|
||||
(sh "brew install cmake"))
|
||||
(unless (file-exists-p "/usr/loacl/opt/llvm/lib/libclang.dylib")
|
||||
;; Since installing llvm is a _huge_ undertaking for homebrew, we force
|
||||
;; you to install it manually.
|
||||
(error "libclang.so not found. Run `brew install llvm` first, then retry"))))
|
||||
(let ((default-directory (concat (file-name-as-directory temporary-file-directory)
|
||||
(file-name-as-directory (format "build-irony-server-%s" (irony-version))))))
|
||||
(irony-install-server
|
||||
(format (concat "%s "
|
||||
(when IS-MAC "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON ")
|
||||
"-DCMAKE_INSTALL_PREFIX='%s' "
|
||||
"%s && %s --build . "
|
||||
"--use-stderr --config Release --target install")
|
||||
(shell-quote-argument irony-cmake-executable)
|
||||
(shell-quote-argument (expand-file-name irony-server-install-prefix))
|
||||
(shell-quote-argument irony-server-source-dir)
|
||||
(shell-quote-argument irony-cmake-executable)))
|
||||
(when IS-MAC
|
||||
(sh (format "install_name_tool -change @rpath/libclang.dylib %s %s"
|
||||
"/usr/local/opt/llvm/lib/libclang.dylib"
|
||||
(expand-file-name "bin/irony-server" irony-server-install-prefix)))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue