{"id":148,"date":"2023-05-20T21:21:54","date_gmt":"2023-05-20T13:21:54","guid":{"rendered":"https:\/\/boostup.cf\/?p=148"},"modified":"2023-06-15T17:03:22","modified_gmt":"2023-06-15T09:03:22","slug":"youcompleteme%e5%9c%a8%e4%bd%8e%e7%89%88%e6%9c%aclinux%e7%b3%bb%e7%bb%9f%e4%b8%8a%e7%9a%84%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/189505.xyz\/?p=148","title":{"rendered":"YouCompleteMe\u5728\u4f4e\u7248\u672cLinux\u7cfb\u7edf\u4e0a\u7684\u5b89\u88c5"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_40 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" area-label=\"ez-toc-toggle-icon-1\"><label for=\"item-69e0617f3a759\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;direction:ltr;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><input  type=\"checkbox\" id=\"item-69e0617f3a759\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/189505.xyz\/?p=148\/#%E5%9F%BA%E6%9C%AC%E9%97%AE%E9%A2%98\" title=\"\n\u57fa\u672c\u95ee\u9898 \n\">\n\u57fa\u672c\u95ee\u9898 \n<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/189505.xyz\/?p=148\/#%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95\" title=\"\n\u89e3\u51b3\u65b9\u6cd5 \n\">\n\u89e3\u51b3\u65b9\u6cd5 \n<\/a><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E5%9F%BA%E6%9C%AC%E9%97%AE%E9%A2%98\"><\/span>\n\u57fa\u672c\u95ee\u9898<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>YouCompleteMe\u5728\u4f4e\u7248\u672cLinux\u4e0a\u5b89\u88c5\u6709\u4ee5\u4e0b\u95ee\u9898:<\/p>\n<ol>\n<li>\n\u7f16\u8bd1YCM\u672c\u8eab\u9700\u8981\u9ad8\u7248\u672c\u7684\u7f16\u8bd1\u5668\n<\/li>\n<li>\nYCM\u9700\u8981\u7684 clangd\u662f\u4e0b\u8f7d\u7684\u4e8c\u8fdb\u5236\uff0cclangd\u4f9d\u8d56\u8f83\u9ad8\u7248\u672c\u7684 glibc\uff0c\u4f4e\u7248\u672cLinux\u4e0a\u7684glibc\u65e0\u6cd5\u6ee1\u8db3clangd \u4e8c\u8fdb\u5236\u7684\u8fd0\u884c\u8981\u6c42\n<\/li>\n<\/ol>\n<h1><span class=\"ez-toc-section\" id=\"%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95\"><\/span>\n\u89e3\u51b3\u65b9\u6cd5<br \/>\n<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<ol>\n<li>\nthird_pardy\/ycmd\/build.py\u4fee\u6539,\u76f4\u63a5\u7ed9cmake\u6307\u5b9a\u7f16\u8bd1\u5668\u8def\u5f84\uff0c\u4f7f\u7528\u9ad8\u7248\u672c\u7684\u7f16\u8bd1\u5668<\/p>\n<pre>\n  compiler_args = ['-DCMAKE_C_COMPILER=\/xxxx\/gcc-10.3.0\/bin\/gcc', '-DCMAKE_CXX_COMPILER=\/xxx\/gcc-10.3.0\/bin\/c++']\n  cmake_args.extend(compiler_args)\n\n<\/pre>\n<\/li>\n<li>\n\u6e90\u7801\u7f16\u8bd1\u4e00\u4e2aclangd\uff0c\u66ff\u6362\u6389YCM\u81ea\u5df1\u4e0b\u8f7d\u7684\u4e8c\u8fdb\u5236\n<\/li>\n<\/ol>\n<p>\u7f16\u8bd1\u8fc7\u7a0b<\/p>\n<pre><code>git clone https:\/\/github.com\/llvm\/llvm-project.git\ncd llvm-project\/llvm\/\nmkdir build\ncd build\n\ncmake -G &quot;Unix Makefiles&quot; \\\n  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \\\n  -DCMAKE_C_COMPILER=\/data\/soft\/distcc\/gcc-10.3.0\/bin\/gcc \\\n  -DCMAKE_CXX_COMPILER=\/data\/soft\/distcc\/gcc-10.3.0\/bin\/c++ \\\n  -DLLVM_ENABLE_PROJECTS=&quot;clang;clang-tools-extra&quot; \\\n  -DCMAKE_INSTALL_PREFIX=\/home\/like12\/opt\/llvm \\\n  -DCMAKE_BUILD_TYPE=Release \\\n  ..\/\nmake install\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u672c\u95ee\u9898 YouCompleteMe\u5728\u4f4e\u7248\u672cLinux\u4e0a\u5b89\u88c5\u6709\u4ee5\u4e0b\u95ee\u9898: \u7f16\u8bd1YCM\u672c\u8eab\u9700\u8981\u9ad8\u7248\u672c\u7684\u7f16\u8bd1\u5668 Y &#8230; <a title=\"YouCompleteMe\u5728\u4f4e\u7248\u672cLinux\u7cfb\u7edf\u4e0a\u7684\u5b89\u88c5\" class=\"read-more\" href=\"https:\/\/189505.xyz\/?p=148\" aria-label=\"More on YouCompleteMe\u5728\u4f4e\u7248\u672cLinux\u7cfb\u7edf\u4e0a\u7684\u5b89\u88c5\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/148"}],"collection":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=148"}],"version-history":[{"count":9,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":183,"href":"https:\/\/189505.xyz\/index.php?rest_route=\/wp\/v2\/posts\/148\/revisions\/183"}],"wp:attachment":[{"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/189505.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}