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

[Windows] Error in CMAKE #787

Open
donizettilorenzo opened this issue Oct 14, 2019 · 2 comments
Open

[Windows] Error in CMAKE #787

donizettilorenzo opened this issue Oct 14, 2019 · 2 comments
Labels

Comments

@donizettilorenzo
Copy link

@donizettilorenzo donizettilorenzo commented Oct 14, 2019

Windows 10 + MSVC 2019 + CMAKE 3.15
LLVM 9 and Clang 9 successfully built and found, but CMAKE gives me this error, configuring the project for MSVC:

_########## The command:
D:/Projects/LLVM/bin/clang++.exe -c --target=x86_64-pc D:/Projects/pocl/compile_test_ynj7m.cc
########## Exited with nonzero status: 1
STDERR: error: unable to open output file 'compile_test_ynj7m.o': 'permission denied'
1 error generated.

########## The command:
D:/Projects/LLVM/bin/clang++.exe -c -target x86_64-pc D:/Projects/pocl/compile_test_AGnB4.cc
########## Exited with nonzero status: 1
STDERR: clang++: error: unknown argument: '-target x86_64-pc'

CMake Error at cmake/LLVM.cmake:423 (message):
Cannot determine Clang option to specify the target
Call Stack (most recent call first):
CMakeLists.txt:411 (include)_

Maybe because of "-target" instead of "--target" ?

@franz

This comment has been minimized.

Copy link
Contributor

@franz franz commented Oct 15, 2019

There is a "-target" vs "--target" option detection in the CMakeLists somewhere, but either way, nobody tried to compile pocl (with LLVM) on Windows for years. So it might require significant effort to get it working.

@donizettilorenzo

This comment has been minimized.

Copy link
Author

@donizettilorenzo donizettilorenzo commented Oct 15, 2019

Maybe the issue with clang++ and its arguments is to be investigated here?

In windows llvm-config reports --target=x86_64-pc-windows-msvc
however this causes clang to use MicrosoftCXXMangler, which does not
yet support mangling for extended vector types (with llvm 3.5)
so for now hardcode LLVM_HOST_TARGET to be x86_64-pc with windows

x86_64-pc is a valid "host triple" ? Building LLVM I've set "X86" as target and "auto" as host triple, you know "x86_64-pc-windows-msvc".....

"-target " and "--target=" are either accepted by clang++

CMake test randomname.o files are simply not created......

@pjaaskel pjaaskel changed the title Error in CMAKE [Windows] Error in CMAKE Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.