diff options
author | dundargoc <gocdundar@gmail.com> | 2023-10-31 12:12:18 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-01 08:20:24 +0100 |
commit | 1997ef134a9a1504fdaf6e7751f470e92d283a45 (patch) | |
tree | d4ee9cbc13a47c18769104b97acc284496eebd9f | |
parent | d7359a87425dc38efda4f74bd580bae9946abe31 (diff) | |
download | rneovim-1997ef134a9a1504fdaf6e7751f470e92d283a45.tar.gz rneovim-1997ef134a9a1504fdaf6e7751f470e92d283a45.tar.bz2 rneovim-1997ef134a9a1504fdaf6e7751f470e92d283a45.zip |
build: set char to always be signed
Sticking to the same convention makes it easier to reason about the code
and reduces complexity.
-rw-r--r-- | .github/workflows/test.yml | 2 | ||||
-rw-r--r-- | src/nvim/CMakeLists.txt | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9fbf4330a..1ff6b31a2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,7 +110,7 @@ jobs: [ { runner: ubuntu-22.04, flavor: asan, cc: clang, flags: -D ENABLE_ASAN_UBSAN=ON }, { runner: ubuntu-22.04, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON }, - { runner: ubuntu-22.04, flavor: uchar, cc: gcc, flags: -D UNSIGNED_CHAR=ON }, + { runner: ubuntu-22.04, cc: gcc }, { runner: macos-12, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER }, { runner: ubuntu-22.04, flavor: functionaltest-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON }, ] diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 9cad80db23..49402a36a8 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -100,7 +100,8 @@ else() -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute - -Wmissing-prototypes) + -Wmissing-prototypes + -fsigned-char) if(CMAKE_C_COMPILER_ID STREQUAL "GNU") target_compile_options(main_lib INTERFACE -fno-common @@ -172,11 +173,6 @@ if(CI_BUILD) endif() endif() -option(UNSIGNED_CHAR "Set char to be unsigned" OFF) -if(UNSIGNED_CHAR) - target_compile_options(main_lib INTERFACE -funsigned-char) -endif() - target_compile_definitions(main_lib INTERFACE INCLUDE_GENERATED_DECLARATIONS) # Remove --sort-common from linker flags, as this seems to cause bugs (see #2641, #3374). |