#Avoiding long semantic analysis on every build

1 messages · Page 1 of 1 (latest)

terse mist
#

I've got a tiny application that depends on Glad and Glfw:

    exe.addCSourceFile("libs/glad/glad.c", &[_][]const u8{"--std=c99"});

    exe.linkSystemLibraryName("gdi32");
    exe.linkSystemLibraryName("user32");
    exe.linkSystemLibraryName("shell32");
    exe.linkSystemLibraryName("opengl32");

    exe.addCSourceFiles(&.{
        "libs/glfw/src/win32_thread.c",
        "libs/glfw/src/wgl_context.c",
        "libs/glfw/src/win32_init.c",
        "libs/glfw/src/win32_monitor.c",
        "libs/glfw/src/win32_time.c",
        "libs/glfw/src/win32_joystick.c",
        "libs/glfw/src/win32_window.c",
        "libs/glfw/src/monitor.c",
        "libs/glfw/src/init.c",
        "libs/glfw/src/input.c",
        "libs/glfw/src/context.c",
        "libs/glfw/src/window.c",
        "libs/glfw/src/osmesa_context.c",
        "libs/glfw/src/vulkan.c",
        "libs/glfw/src/egl_context.c",
    }, &.{ "-D_GLFW_WIN32", "-Ilibs/glfw/src" });

I believe this is causing a long 1-3 second semantic analysis step on every build. Is this necessary? Or can I cache something here?

carmine cobalt
#

semantic analysis is zig only, so not related to c sources

#

currently it has to recompile all of the referenced parts of the standard library every build