1. Make resource dir unique and global.
2. Use our custom CDB loader.
This commit is contained in:
19
include/Compiler/Command.h
Normal file
19
include/Compiler/Command.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "Clang.h"
|
||||
|
||||
namespace clice {
|
||||
|
||||
/// Processes and adjusts a raw compile command from compile_commands.json.
|
||||
///
|
||||
/// This function tokenizes the input command, removes unnecessary arguments,
|
||||
/// and ensures the resulting format is suitable for execution.
|
||||
///
|
||||
/// @param command The raw shell-escaped compile command.
|
||||
/// @param out A vector to hold pointers to the processed arguments.
|
||||
/// @param buffer A storage buffer for the actual argument strings.
|
||||
llvm::Error mangleCommand(llvm::StringRef command,
|
||||
llvm::SmallVectorImpl<const char*>& out,
|
||||
llvm::SmallVectorImpl<char>& buffer);
|
||||
|
||||
} // namespace clice
|
||||
@@ -129,11 +129,17 @@ struct PCMInfo {
|
||||
};
|
||||
|
||||
struct CompliationParams {
|
||||
/// Source file content.
|
||||
llvm::StringRef content;
|
||||
|
||||
/// Source file path.
|
||||
llvm::SmallString<128> srcPath;
|
||||
|
||||
/// Source file content.
|
||||
llvm::StringRef content;
|
||||
/// Output file path.
|
||||
llvm::SmallString<128> outPath;
|
||||
|
||||
/// Responsible for storing the arguments.
|
||||
llvm::SmallString<1024> command;
|
||||
|
||||
/// - If we are building PCH, we need a size to verify the bounds of preamble. That is
|
||||
/// which source code range the PCH will cover.
|
||||
@@ -148,12 +154,6 @@ struct CompliationParams {
|
||||
/// - If the header is not empty, the preprocessor must be executed to compute the bounds.
|
||||
void computeBounds(llvm::StringRef header = "");
|
||||
|
||||
/// Command line arguments.
|
||||
llvm::ArrayRef<const char*> args;
|
||||
|
||||
/// Output file path.
|
||||
llvm::SmallString<128> outPath;
|
||||
|
||||
llvm::IntrusiveRefCntPtr<vfs::FileSystem> vfs = new ThreadSafeFS();
|
||||
|
||||
/// Information about reuse PCH.
|
||||
|
||||
Reference in New Issue
Block a user