* clang-tidy @ 2018-12-21 3:23 Brett Gilio 2018-12-21 4:48 ` clang-tidy fis trivial 0 siblings, 1 reply; 3+ messages in thread From: Brett Gilio @ 2018-12-21 3:23 UTC (permalink / raw) To: Guix-devel Hi all, Just curious, do we have clang-tidy packaged somewhere? I have clang installed and am not able to reference that binary in my exec path. As far as I understand, it should be included in the default clang installation. Best, Brett Gilio ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: clang-tidy 2018-12-21 3:23 clang-tidy Brett Gilio @ 2018-12-21 4:48 ` fis trivial 2018-12-21 4:53 ` clang-tidy fis trivial 0 siblings, 1 reply; 3+ messages in thread From: fis trivial @ 2018-12-21 4:48 UTC (permalink / raw) To: Brett Gilio; +Cc: Guix-devel Hi Brett, Clang-tidy comes from clang-extra-tools, which is not bundled in guix package. I have my own clang packaging based on clang-7. But I don't have time to test upgrading LLVM on core-update. Here is my clang package which includes clang extra tools, anyone interested in packaging LLVM-7 for and friends for GUIX can copy it without any constrain: (define-public clang (package (name "clang") (version (package-version llvm)) (source (origin (method url-fetch) (uri (string-append "http://releases.llvm.org/" version "/cfe-" version ".src.tar.xz")) (sha256 (base32 "0mdsbgj3p7mayhzm8hclzl3i46r2lwa8fr1cz399f9km3iqi40jm")) (patches (search-patches "clang-add-CUDA-path-params.patch")) (file-name (string-append name "-" version ".tar.gz")))) (build-system cmake-build-system) (native-inputs (package-native-inputs llvm)) (inputs `(("libxml2" ,libxml2) ("gcc-lib" ,gcc "lib") ("gcc" ,gcc) ("clang-extra-tools" ,(origin (method url-fetch) (uri (string-append "http://releases.llvm.org/" version "/clang-tools-extra-" version ".src.tar.xz")) (file-name (string-append "clang-extra-tools-" version ".tar.xz")) (sha256 (base32 "1glxl7bnr4k3j16s8xy8r9cl0llyg524f50591g1ig23ij65lz4k")))) ("linux-libre-headers" ,linux-libre-headers) ,@(package-inputs llvm))) (propagated-inputs `(("llvm" ,llvm) ("clang-runtime" ,clang-runtime))) (arguments `(#:configure-flags (list "-DCLANG_INCLUDE_TESTS=True" "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" "-DCLANG_DEFAULT_RTLIB=libgcc" ;; Find libgcc_s, crtbegin.o, and crtend.o. (string-append "-DGCC_INSTALL_PREFIX=" (assoc-ref %build-inputs "gcc-lib")) ;; Use a sane default include directory. (string-append "-DC_INCLUDE_DIRS=" (assoc-ref %build-inputs "libc") "/include" ":" (assoc-ref %build-inputs "gcc") "/include/c++" ":" (assoc-ref %build-inputs "gcc") "/include/c++/x86_64-unknown-linux-gnu/" ":" (assoc-ref %build-inputs "linux-libre-headers") "/include" ":" (assoc-ref %build-inputs "gcc-lib") ; openmp "/lib/gcc/x86_64-unknown-linux-gnu/" ,(package-version gcc) "/include/")) ;; Don't use '-g' during the build to save space. #:build-type "Release" #:phases (modify-phases %standard-phases (add-after 'unpack 'unpack-extra-tools (lambda* (#:key inputs #:allow-other-keys) (let ((untar (lambda (tarball output) (with-directory-excursion output (invoke "tar" "-xvf" (assoc-ref inputs tarball)))))) (untar "clang-extra-tools" "tools/") (with-directory-excursion "tools/" (rename-file (string-append "clang-tools-extra-" ,version ".src") "extra")) #t))) (add-after 'unpack 'set-glibc-file-names (lambda* (#:key inputs #:allow-other-keys) (let ((compiler-rt (assoc-ref inputs "clang-runtime"))) (substitute* "lib/Driver/ToolChain.cpp" (("getDriver\\(\\)\\.ResourceDir") (string-append "\"" compiler-rt "\""))) #t)))))) ;; Clang supports the same environment variables as GCC. (native-search-paths (list (search-path-specification (variable "CPATH") (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) (home-page "https://clang.llvm.org") (synopsis "C language family frontend for LLVM") (description "Clang is a compiler front end for the C, C++, Objective-C and Objective-C++ programming languages. It uses LLVM as its back end. The Clang project includes the Clang front end, the Clang static analyzer, and several code analysis tools.") (license license:ncsa))) Brett Gilio writes: > Hi all, > > Just curious, do we have clang-tidy packaged somewhere? I have clang > installed and am not able to reference that binary in my exec path. > As far as I understand, it should be included in the default clang installation. > > Best, > Brett Gilio -- Jiaming ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: clang-tidy 2018-12-21 4:48 ` clang-tidy fis trivial @ 2018-12-21 4:53 ` fis trivial 0 siblings, 0 replies; 3+ messages in thread From: fis trivial @ 2018-12-21 4:53 UTC (permalink / raw) To: Brett Gilio; +Cc: Guix-devel Please ignore the patches field though. Trivial Fis writes: > Hi Brett, > > Clang-tidy comes from clang-extra-tools, which is not bundled in guix package. > I have my own clang packaging based on clang-7. But I don't have time to test > upgrading LLVM on core-update. Here is my clang package which includes clang > extra tools, anyone interested in packaging LLVM-7 for and friends for GUIX can > copy it without any constrain: > > (define-public clang > (package > (name "clang") > (version (package-version llvm)) > (source > (origin (method url-fetch) > (uri (string-append "http://releases.llvm.org/" > version "/cfe-" version ".src.tar.xz")) > (sha256 > (base32 > "0mdsbgj3p7mayhzm8hclzl3i46r2lwa8fr1cz399f9km3iqi40jm")) > (patches (search-patches "clang-add-CUDA-path-params.patch")) > (file-name (string-append name "-" version ".tar.gz")))) > (build-system cmake-build-system) > (native-inputs (package-native-inputs llvm)) > (inputs > `(("libxml2" ,libxml2) > ("gcc-lib" ,gcc "lib") > ("gcc" ,gcc) > ("clang-extra-tools" > ,(origin > (method url-fetch) > (uri > (string-append "http://releases.llvm.org/" > version "/clang-tools-extra-" > version ".src.tar.xz")) > (file-name (string-append "clang-extra-tools-" version ".tar.xz")) > (sha256 > (base32 "1glxl7bnr4k3j16s8xy8r9cl0llyg524f50591g1ig23ij65lz4k")))) > ("linux-libre-headers" ,linux-libre-headers) > ,@(package-inputs llvm))) > (propagated-inputs > `(("llvm" ,llvm) > ("clang-runtime" ,clang-runtime))) > (arguments > `(#:configure-flags > (list > "-DCLANG_INCLUDE_TESTS=True" > "-DCLANG_DEFAULT_CXX_STDLIB=libstdc++" > "-DCLANG_DEFAULT_RTLIB=libgcc" > ;; Find libgcc_s, crtbegin.o, and crtend.o. > (string-append > "-DGCC_INSTALL_PREFIX=" > (assoc-ref %build-inputs "gcc-lib")) > ;; Use a sane default include directory. > (string-append > "-DC_INCLUDE_DIRS=" > (assoc-ref %build-inputs "libc") > "/include" ":" > (assoc-ref %build-inputs "gcc") > "/include/c++" ":" > (assoc-ref %build-inputs "gcc") > "/include/c++/x86_64-unknown-linux-gnu/" ":" > (assoc-ref %build-inputs "linux-libre-headers") > "/include" ":" > (assoc-ref %build-inputs "gcc-lib") ; openmp > "/lib/gcc/x86_64-unknown-linux-gnu/" ,(package-version gcc) "/include/")) > ;; Don't use '-g' during the build to save space. > #:build-type "Release" > #:phases > (modify-phases %standard-phases > (add-after 'unpack 'unpack-extra-tools > (lambda* (#:key inputs #:allow-other-keys) > (let ((untar > (lambda (tarball output) > (with-directory-excursion output > (invoke "tar" "-xvf" (assoc-ref inputs tarball)))))) > (untar "clang-extra-tools" "tools/") > (with-directory-excursion "tools/" > (rename-file > (string-append "clang-tools-extra-" ,version ".src") > "extra")) > #t))) > (add-after > 'unpack 'set-glibc-file-names > (lambda* (#:key inputs #:allow-other-keys) > (let ((compiler-rt (assoc-ref inputs "clang-runtime"))) > (substitute* "lib/Driver/ToolChain.cpp" > (("getDriver\\(\\)\\.ResourceDir") > (string-append "\"" compiler-rt "\""))) > #t)))))) > ;; Clang supports the same environment variables as GCC. > (native-search-paths > (list (search-path-specification > (variable "CPATH") > (files '("include"))) > (search-path-specification > (variable "LIBRARY_PATH") > (files '("lib" "lib64"))))) > (home-page "https://clang.llvm.org") > (synopsis "C language family frontend for LLVM") > (description > "Clang is a compiler front end for the C, C++, Objective-C and > Objective-C++ programming languages. It uses LLVM as its back end. The Clang > project includes the Clang front end, the Clang static analyzer, and several > code analysis tools.") > (license license:ncsa))) > > Brett Gilio writes: > >> Hi all, >> >> Just curious, do we have clang-tidy packaged somewhere? I have clang >> installed and am not able to reference that binary in my exec path. >> As far as I understand, it should be included in the default clang installation. >> >> Best, >> Brett Gilio -- Jiaming ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-21 4:53 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-12-21 3:23 clang-tidy Brett Gilio 2018-12-21 4:48 ` clang-tidy fis trivial 2018-12-21 4:53 ` clang-tidy fis trivial
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).