pekka.jaaskelainen added a comment. In https://reviews.llvm.org/D28080#651732, @Anastasia wrote:
> @pekka.jaaskelainen, I just compiled the release 4.0 branch and it all works > for me as expected: > clang -cc1 -triple spir64-unknown-unknown test.cl > clang -target spir64-unknown-unknown test.cl Yes, that seems to work. The problem was confusion with the frontend flag parameter. With the -cc1 it switches all parameters to the frontend mode, not only the next one (like -Xclang does). When I pass -Xclang before -cc1, it fails, if after, it fails also, but differently: $ clang -cc1 -triple spir64-unknown-unknown -Xclang -finclude-default-header ~/temp/local.cl error: unknown argument: '-Xclang' $ clang -Xclang -finclude-default-header -cc1 -triple spir64-unknown-unknown ~/temp/local.cl clang-4.0: error: unknown argument: '-cc1' clang-4.0: error: unknown argument: '-triple' clang-4.0: error: no such file or directory: 'spir64-unknown-unknown' (I should pass -finclude-default-header after -cc1 without -Xclang then it works, but I think also the latter version should work, no?) Also, I cannot add -S (even with -emit-llvm), then it complains about a missing target: $ clang -cc1 -triple spir64-unknown-unknown ~/temp/local.cl -S error: unable to create target: 'No available targets are compatible with this triple.' I think -S used to work with -emit-llvm as a switch to output LLVM text instead of bitcode, but now it seems to output text by default so it should not be used. Is there are reason to use/document the -cc1 -triple instead of -target here? Also, for me the command without -emit-llvm doesn't output anything. https://reviews.llvm.org/D28080 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits