[all-commits] [llvm/llvm-project] ded080: [libc] Add osutils for Windows and make libc and i...

Sirui Mu via All-commits all-commits at lists.llvm.org
Wed Sep 11 20:41:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ded080152acceca5d68014d63f5027a6d8266cbb
      https://github.com/llvm/llvm-project/commit/ded080152acceca5d68014d63f5027a6d8266cbb
  Author: Sirui Mu <msrlancern at gmail.com>
  Date:   2024-09-11 (Wed, 11 Sep 2024)

  Changed paths:
    M libc/cmake/modules/LLVMLibCArchitectures.cmake
    M libc/include/llvm-libc-macros/float16-macros.h
    M libc/include/llvm-libc-macros/stdckdint-macros.h
    M libc/src/__support/CPP/CMakeLists.txt
    M libc/src/__support/CPP/new.cpp
    M libc/src/__support/CPP/new.h
    M libc/src/__support/OSUtil/io.h
    A libc/src/__support/OSUtil/windows/CMakeLists.txt
    A libc/src/__support/OSUtil/windows/exit.cpp
    A libc/src/__support/OSUtil/windows/io.cpp
    A libc/src/__support/OSUtil/windows/io.h
    M libc/src/__support/macros/properties/types.h
    M libc/test/src/__support/CMakeLists.txt
    M libc/test/src/__support/FPUtil/CMakeLists.txt
    M libc/test/src/__support/FPUtil/fpbits_test.cpp
    M libc/test/src/__support/arg_list_test.cpp
    M libc/test/src/fenv/CMakeLists.txt
    M libc/test/src/fenv/getenv_and_setenv_test.cpp
    M libc/test/src/math/smoke/AddTest.h
    M libc/test/src/math/smoke/CMakeLists.txt
    M libc/test/src/math/smoke/SubTest.h
    M libc/test/src/string/memory_utils/CMakeLists.txt
    M libc/test/src/string/memory_utils/op_tests.cpp

  Log Message:
  -----------
  [libc] Add osutils for Windows and make libc and its tests build on Windows target (#104676)

This PR first adds osutils for Windows, and changes some libc code to
make libc and its tests build on the Windows target. It then temporarily
disables some libc tests that are currently problematic on Windows.

Specifically, the changes besides the addition of osutils include:

- Macro `LIBC_TYPES_HAS_FLOAT16` is disabled on Windows. `clang-cl`
generates calls to functions in `compiler-rt` to handle float16
arithmetic and these functions are currently not linked in on Windows.
- Macro `LIBC_TYPES_HAS_INT128` is disabled on Windows.
- The invocation to `::aligned_malloc` is changed to an invocation to
`::_aligned_malloc`.
- The following unit tests are temporarily disabled because they
currently fail on Windows:
  - `test.src.__support.big_int_test`
  - `test.src.__support.arg_list_test`
  - `test.src.fenv.getenv_and_setenv_test`
- Tests involving `__m128i`, `__m256i`, and `__m512i` in
`test.src.string.memory_utils.op_tests.cpp`
- `test_range_errors` in `libc/test/src/math/smoke/AddTest.h` and
`libc/test/src/math/smoke/SubTest.h`



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list