| ... | @@ -554,6 +554,8 @@ fn addCmakeCfgOptionsToExe( | ... | @@ -554,6 +554,8 @@ fn addCmakeCfgOptionsToExe( |
| 554 | }) catch unreachable); | 554 | }) catch unreachable); |
| 555 | assert(cfg.lld_include_dir.len != 0); | 555 | assert(cfg.lld_include_dir.len != 0); |
| 556 | exe.addIncludePath(cfg.lld_include_dir); | 556 | exe.addIncludePath(cfg.lld_include_dir); |
| | 557 | exe.addIncludePath(cfg.llvm_include_dir); |
| | 558 | exe.addLibraryPath(cfg.llvm_lib_dir); |
| 557 | addCMakeLibraryList(exe, cfg.clang_libraries); | 559 | addCMakeLibraryList(exe, cfg.clang_libraries); |
| 558 | addCMakeLibraryList(exe, cfg.lld_libraries); | 560 | addCMakeLibraryList(exe, cfg.lld_libraries); |
| 559 | addCMakeLibraryList(exe, cfg.llvm_libraries); | 561 | addCMakeLibraryList(exe, cfg.llvm_libraries); |
| ... | @@ -684,6 +686,8 @@ const CMakeConfig = struct { | ... | @@ -684,6 +686,8 @@ const CMakeConfig = struct { |
| 684 | lld_include_dir: []const u8, | 686 | lld_include_dir: []const u8, |
| 685 | lld_libraries: []const u8, | 687 | lld_libraries: []const u8, |
| 686 | clang_libraries: []const u8, | 688 | clang_libraries: []const u8, |
| | 689 | llvm_lib_dir: []const u8, |
| | 690 | llvm_include_dir: []const u8, |
| 687 | llvm_libraries: []const u8, | 691 | llvm_libraries: []const u8, |
| 688 | dia_guids_lib: []const u8, | 692 | dia_guids_lib: []const u8, |
| 689 | }; | 693 | }; |
| ... | @@ -745,6 +749,8 @@ fn parseConfigH(b: *Builder, config_h_text: []const u8) ?CMakeConfig { | ... | @@ -745,6 +749,8 @@ fn parseConfigH(b: *Builder, config_h_text: []const u8) ?CMakeConfig { |
| 745 | .lld_include_dir = undefined, | 749 | .lld_include_dir = undefined, |
| 746 | .lld_libraries = undefined, | 750 | .lld_libraries = undefined, |
| 747 | .clang_libraries = undefined, | 751 | .clang_libraries = undefined, |
| | 752 | .llvm_lib_dir = undefined, |
| | 753 | .llvm_include_dir = undefined, |
| 748 | .llvm_libraries = undefined, | 754 | .llvm_libraries = undefined, |
| 749 | .dia_guids_lib = undefined, | 755 | .dia_guids_lib = undefined, |
| 750 | }; | 756 | }; |
| ... | @@ -782,6 +788,14 @@ fn parseConfigH(b: *Builder, config_h_text: []const u8) ?CMakeConfig { | ... | @@ -782,6 +788,14 @@ fn parseConfigH(b: *Builder, config_h_text: []const u8) ?CMakeConfig { |
| 782 | .prefix = "#define ZIG_DIA_GUIDS_LIB ", | 788 | .prefix = "#define ZIG_DIA_GUIDS_LIB ", |
| 783 | .field = "dia_guids_lib", | 789 | .field = "dia_guids_lib", |
| 784 | }, | 790 | }, |
| | 791 | .{ |
| | 792 | .prefix = "#define ZIG_LLVM_INCLUDE_PATH ", |
| | 793 | .field = "llvm_include_dir", |
| | 794 | }, |
| | 795 | .{ |
| | 796 | .prefix = "#define ZIG_LLVM_LIB_PATH ", |
| | 797 | .field = "llvm_lib_dir", |
| | 798 | }, |
| 785 | // .prefix = ZIG_LLVM_LINK_MODE parsed manually below | 799 | // .prefix = ZIG_LLVM_LINK_MODE parsed manually below |
| 786 | }; | 800 | }; |
| 787 | | 801 | |