Luma 0.1.0
A low-level compiled alternative to C, C++, and more!
Loading...
Searching...
No Matches
Macros | Functions
run.c File Reference
#include "../ast/ast_utils.h"
#include "../auto_docs/doc_generator.h"
#include "../c_libs/error/error.h"
#include "../llvm/llvm.h"
#include "../parser/parser.h"
#include "../typechecker/type.h"
#include "help.h"
#include "std_path.h"
#include <errno.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
Include dependency graph for run.c:

Macros

#define MKDIR(path)   mkdir(path, 0755)
 
#define create_directory(path)   (mkdir((path), 0755) == 0 || errno == EEXIST)
 

Functions

void handle_segfault (int sig)
 
void handle_illegal_instruction (int sig)
 
void save_module_output_files (CodeGenContext *ctx, const char *output_dir)
 
const char * resolve_import_path (const char *path, ArenaAllocator *allocator)
 
bool generate_llvm_code_modules (AstNode *root, BuildConfig config, ArenaAllocator *allocator, int *step, CompileTimer *timer)
 
bool ensure_directory_exists (const char *path)
 
bool ensure_parent_directory (const char *filepath)
 
void collect_link_flags (CodeGenContext *ctx, char *lib_flags, size_t lib_flags_size)
 
bool link_object_files (const char *output_dir, const char *executable_name, int opt_level, bool is_debug, CodeGenContext *ctx)
 
Stmtparse_file_to_module (const char *path, size_t position, ArenaAllocator *allocator, BuildConfig *config)
 
AstNodelex_and_parse_file (const char *path, ArenaAllocator *allocator, BuildConfig *config)
 
bool run_build (BuildConfig config, ArenaAllocator *allocator)
 

Macro Definition Documentation

◆ create_directory

#define create_directory (   path)    (mkdir((path), 0755) == 0 || errno == EEXIST)

◆ MKDIR

#define MKDIR (   path)    mkdir(path, 0755)

Function Documentation

◆ collect_link_flags()

void collect_link_flags ( CodeGenContext ctx,
char *  lib_flags,
size_t  lib_flags_size 
)

◆ ensure_directory_exists()

bool ensure_directory_exists ( const char *  path)

◆ ensure_parent_directory()

bool ensure_parent_directory ( const char *  filepath)

◆ generate_llvm_code_modules()

bool generate_llvm_code_modules ( AstNode root,
BuildConfig  config,
ArenaAllocator allocator,
int *  step,
CompileTimer timer 
)

◆ handle_illegal_instruction()

void handle_illegal_instruction ( int  sig)

◆ handle_segfault()

void handle_segfault ( int  sig)

◆ lex_and_parse_file()

AstNode * lex_and_parse_file ( const char *  path,
ArenaAllocator allocator,
BuildConfig config 
)

◆ link_object_files()

bool link_object_files ( const char *  output_dir,
const char *  executable_name,
int  opt_level,
bool  is_debug,
CodeGenContext ctx 
)

◆ parse_file_to_module()

Stmt * parse_file_to_module ( const char *  path,
size_t  position,
ArenaAllocator allocator,
BuildConfig config 
)

◆ resolve_import_path()

const char * resolve_import_path ( const char *  path,
ArenaAllocator allocator 
)

◆ run_build()

bool run_build ( BuildConfig  config,
ArenaAllocator allocator 
)

◆ save_module_output_files()

void save_module_output_files ( CodeGenContext ctx,
const char *  output_dir 
)