Skip to content

Commit

Permalink
[ci] more thorough compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
momentarylapse committed Oct 6, 2024
1 parent d3318b8 commit 5e575b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_CXX_FLAGS="-Wall -Werror"
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/vulkan/CommandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void CommandBuffer::next_subpass() {
}

void CommandBuffer::set_scissor(const rect &r) {
VkRect2D scissor = {(int)r.x1, (int)r.y1, (unsigned int)r.width(), (unsigned int)r.height()};
VkRect2D scissor = {{(int)r.x1, (int)r.y1}, {(unsigned int)r.width(), (unsigned int)r.height()}};
vkCmdSetScissor(buffer, 0, 1, &scissor);
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/vulkan/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ static shaderc_compiler_t shaderc = nullptr;



const int TYPE_LAYOUT = -41;
const int TYPE_MODULE = -42;
[[maybe_unused]] const int TYPE_LAYOUT = -41;
[[maybe_unused]] const int TYPE_MODULE = -42;


string vertex_module_default = "vertex-default-nix";
Expand Down
10 changes: 4 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "lib/net/net.h"
#include "lib/kaba/kaba.h"
#include "lib/kaba/Interpreter.h"
#include "lib/kaba/lib/lib.h"
#include "helper/elf.h"
#include "helper/symbols.h"
#include "helper/experiments.h"
Expand All @@ -25,6 +26,8 @@ namespace kaba {
extern int64 s2i2(const string &str);
};

KABA_LINK_GROUP_BEGIN

class KabaApp : public hui::Application {
public:
KabaApp() :
Expand Down Expand Up @@ -286,11 +289,6 @@ class KabaApp : public hui::Application {
return nullptr;
}

#pragma GCC push_options
#pragma GCC optimize("no-omit-frame-pointer")
#pragma GCC optimize("no-inline")
#pragma GCC optimize("0")

void execute(shared<kaba::Module> s, const Array<string> &args) {
if (kaba::config.target.interpreted) {
s->interpreter->run("main");
Expand Down Expand Up @@ -320,7 +318,6 @@ class KabaApp : public hui::Application {
die("no 'func main()' or 'func main(string[])' found");
}
}
#pragma GCC pop_options

static void output_to_file_raw(shared<kaba::Module> s, const Path &_out_file) {
auto f = os::fs::open(_out_file, "wb");
Expand All @@ -344,6 +341,7 @@ class KabaApp : public hui::Application {
msg_write(Asm::disassemble(&s[data_size], s.num-data_size, true));
}
};
KABA_LINK_GROUP_END


HUI_EXECUTE(KabaApp)

0 comments on commit 5e575b2

Please sign in to comment.