Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAS Unittests broken on Windows #7883

Closed
compnerd opened this issue Dec 15, 2023 · 1 comment · Fixed by #7890
Closed

CAS Unittests broken on Windows #7883

compnerd opened this issue Dec 15, 2023 · 1 comment · Fixed by #7890
Assignees

Comments

@compnerd
Copy link
Collaborator

FAILED: unittests/CAS/CMakeFiles/CASTests.dir/CASTestConfig.cpp.obj
C:\PROGRA~2\MICROS~2\2022\BUILDT~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_LIBCPP_ENABLE_HARDENED_MODE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IS:\b\1\unittests\CAS -IS:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS -IS:\b\1\include -IS:\SourceCache\swift-project\llvm-project\llvm\include -IS:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include -IS:\SourceCache\swift-project\llvm-project\third-party\unittest\googlemock\include /GS- /Gw /Gy /Oi /Oy /Zc:inline /Zi /Zc:__cplusplus /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Zi /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2  -std:c++17 -MD  /EHs-c- /GR- -UNDEBUG /showIncludes /Founittests\CAS\CMakeFiles\CASTests.dir\CASTestConfig.cpp.obj /Fdunittests\CAS\CMakeFiles\CASTests.dir\ /FS -c S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\CASTestConfig.cpp
S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\CASTestConfig.cpp(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\CASTestConfig.cpp(30): error C2065: 'constructor': undeclared identifier
S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\CASTestConfig.cpp(30): error C2062: type 'void' unexpected                                                                                                                                                                 S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\CASTestConfig.cpp(30): error C2143: syntax error: missing ';' before '{'                                                                                                                                                   S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\CASTestConfig.cpp(30): error C2447: '{': missing function header (old-style formal list?)                                                                                                                                  [315/864] Building CXX object unittests\CAS\CMakeFiles\CASTests.dir\ObjectStoreTest.cpp.obj                                                                                                                                                                                             S:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include\gtest/internal/custom/raw-ostream.h(68): warning C4180: qualifier applied to function type has no meaning; ignored                                                                                    S:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include\gtest/internal/custom/raw-ostream.h(34): note: see reference to class template instantiation 'llvm_gtest::StreamSwitch<T,void>' being compiled
        with
        [
            T=void (llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,uint64_t)
        ]
S:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include\gtest/gtest-message.h(132): note: see reference to function template instantiation 'decltype(auto) llvm_gtest::printable<T>(T (__cdecl &))' being compiled
        with
        [
            T=void (llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,uint64_t)
        ]
S:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include\gtest/gtest.h(2223): note: see reference to function template instantiation 'testing::Message &testing::Message::operator <<<T>(T (__cdecl &))' being compiled
        with
        [
            T=void (llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,uint64_t)
        ]
S:\SourceCache\swift-project\llvm-project\llvm\unittests\CAS\ObjectStoreTest.cpp(286): note: see reference to function template instantiation 'testing::ScopedTrace::ScopedTrace<void(llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,uint64_t)>(const char *,int,T (__cdecl &))' being compiled
        with
        [
            T=void (llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,uint64_t)
        ]
S:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include\gtest/internal/custom/raw-ostream.h(53): warning C4180: qualifier applied to function type has no meaning; ignored
S:\SourceCache\swift-project\llvm-project\third-party\unittest\googletest\include\gtest/internal/custom/raw-ostream.h(36): note: see reference to class template instantiation 'llvm_gtest::RawStreamProxy<T>' being compiled
        with
        [
            T=void (llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,llvm::cas::ObjectStore &,uint64_t)
        ]
[323/864] Building CXX object unittests\CodeGen\CMakeFiles\CodeGenTests.dir\AArch64SelectionDAGTest.cpp.obj
@cachemeifyoucan
Copy link

This is limiting the CAS size when running the tests. Somehow OnDiskCAS is on by default now on windows so this test is actually getting run. I think I just remove this piece of code for windows for CAS upstreaming but I don't think windows has test cleanly passing now with this version of OnDiskCAS implementation.

I will build and verify the tests on windows before doing a simple fix. (you can just comment the entire constructor function off for now).

cachemeifyoucan added a commit to cachemeifyoucan/llvm-project that referenced this issue Dec 17, 2023
Fix the CAS unit-test build for windows which doesn't have the same
setenv function and constructor attributes. Implement the default ondisk
cas differently so it can be overwritten from environmental variable,
or overwrite the value in process directly.

Fix: apple#7883
cachemeifyoucan added a commit to cachemeifyoucan/llvm-project that referenced this issue Dec 17, 2023
Fix the CAS unit-test build for windows which doesn't have the same
setenv function and constructor attributes. Implement the default ondisk
cas differently so it can be overwritten from environmental variable,
or overwrite the value in process directly.

Fix: apple#7883
cachemeifyoucan added a commit that referenced this issue Dec 18, 2023
Fix the CAS unit-test build for windows which doesn't have the same
setenv function and constructor attributes. Implement the default ondisk
cas differently so it can be overwritten from environmental variable,
or overwrite the value in process directly.

Fix: #7883
cachemeifyoucan added a commit that referenced this issue Dec 19, 2023
Fix the CAS unit-test build for windows which doesn't have the same
setenv function and constructor attributes. Implement the default ondisk
cas differently so it can be overwritten from environmental variable,
or overwrite the value in process directly.

Fix: #7883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants