Skip to content

Commit

Permalink
feat(lsp): lsp on windows with msvc now works, llvm compiles in one g…
Browse files Browse the repository at this point in the history
…o, windows development is no longer impossible.
  • Loading branch information
Ze7111 committed Aug 31, 2024
1 parent 0a3e1ce commit e761407
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .clangd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CompileFlags:
CompileCommandsDir: .
Add:
- "-std=c++latest"
- "-std=c++23"
- "/std:c++latest"
- "-Zc:__cplusplus"
17 changes: 11 additions & 6 deletions xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
-- FIXME: rename main.cc to helix.cc
set_project("helix-lang")
add_rules("mode.debug", "mode.release")

add_rules("plugin.vsxmake.autoupdate")
add_rules("plugin.compile_commands.autoupdate", {outputdir = "."})

set_version("0.0.1", {soname = true})
set_description("The Helix Compiler. Python's Simplicity, Rust inspired Syntax, and C++'s Power")
Expand Down Expand Up @@ -69,15 +71,16 @@ package("llvm-clang")
package_end()

-- specify the use of the LLVM-Clang package
add_requires("zlib")
add_requires("zstd")

add_packages("zlib")
add_packages("zstd")

add_requires("llvm-clang")

-- TODO windows only oc
if os.host() == "windows" then
add_requires("zlib")
add_requires("zstd")

add_packages("zlib")
add_packages("zstd")
add_syslinks("ntdll", "version")

add_includedirs(".\\libs\\llvm-18.1.9-src\\llvm\\include")
Expand Down Expand Up @@ -116,7 +119,10 @@ end

add_includedirs("source")
add_files("source/**.cc") -- add all files in the source directory

add_headerfiles("source/**.hh") -- add all headers in the source directory
add_headerfiles("source/**.def")
add_headerfiles("source/**.inc")
add_packages("llvm-clang") -- link against the LLVM-Clang package
add_links("zstd")

Expand All @@ -131,7 +137,6 @@ target("tests")
add_files("tests/**.cc") -- add all files in the tests directory
remove_files("source/helix.cc") -- exclude main.cc from the source directory

add_headerfiles("tests/**.hh") -- add all headers in the tests directory
add_includedirs("tests/lib") -- add all libs in the tests dir

set_symbols("debug") -- Generate debug symbols
Expand Down

0 comments on commit e761407

Please sign in to comment.