cl.exe's assembly output is in intel syntax, so clang-cl's should be too, PR35031.
Details
Diff Detail
Event Timeline
This patch fails on powerpc64
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/14380
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/13463
- TEST 'Clang :: Driver/masm.c' FAILED ****
Script:
/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target i386-unknown-linux -masm=intel -S /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c -# 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck --check-prefix=CHECK-INTEL /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c
/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target i386-unknown-linux -masm=att -S /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c -# 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck --check-prefix=CHECK-ATT /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c
/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target i386-unknown-linux -S -masm=somerequired /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c -# 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck --check-prefix=CHECK-SOMEREQUIRED /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c
/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target arm-unknown-eabi -S -masm=intel /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c -# 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck --check-prefix=CHECK-ARM /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c
/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang --driver-mode=cl /FA -### -- /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck --check-prefix=CHECK-CL /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c
Exit Code: 1
Command Output (stderr):
/home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c:12:14: error: expected string not found in input
// CHECK-CL: -x86-asm-syntax=intel
^
<stdin>:1:1: note: scanning from here
clang version 7.0.0 (trunk 322652)
^
<stdin>:6:930: note: possible intended match here
"/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang-6.0" "-cc1" "-triple" "powerpc64le-pc-windows-msvc19.11.0" "-S" "-disable-free" "-main-file-name" "masm.c" "-mrelocation-model" "static" "-mthread-model" "posix" "-relaxed-aliasing" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases" "-target-cpu" "ppc64le" "-mfloat-abi" "hard" "-D_MT" "-flto-visibility-public-std" "--dependent-lib=libcmt" "--dependent-lib=oldnames" "-stack-protector" "2" "-fdiagnostics-format" "msvc" "-dwarf-column-info" "-debugger-tuning=gdb" "-momit-leaf-frame-pointer" "-resource-dir" "/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/lib/clang/7.0.0" "-internal-isystem" "/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/lib/clang/7.0.0/include" "-fdebug-compilation-dir" "/home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/Driver" "-ferror-limit" "19" "-fmessage-length" "0" "-fno-signed-char" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.11" "-fdelayed-template-parsing" "-fobjc-runtime=gcc" "-fseh-exceptions" "-fdiagnostics-show-option" "-o" "masm.asm" "-x" "c" "/home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/tools/clang/test/Driver/masm.c"
hi! I try to assemble the .asm outputted from clang-cl by ML/ML64.exe on windows10.
The ".asm" files outputted from clang-cl /FA / are supports to assemble by ML/ML64.exe on windows?
when assembleed by ML.exe, errors A2008:syntax error and A2044:invalid character in file occured.
(Developer Command Prompt for VS 2019)
>ml helloworld.asm Microsoft (R) Macro Assembler Version 14.26.28806.0 Copyright (C) Microsoft Corporation. All rights reserved. Assembling: helloworld.asm helloworld.asm(1) : error A2008:syntax error : . helloworld.asm(2) : error A2008:syntax error : . helloworld.asm(3) : error A2008:syntax error : . helloworld.asm(4) : error A2008:syntax error : .type helloworld.asm(5) : error A2008:syntax error : . helloworld.asm(6) : error A2008:syntax error : . helloworld.asm(7) : error A2008:syntax error : . helloworld.asm(8) : error A2008:syntax error : . helloworld.asm(9) : error A2008:syntax error : . helloworld.asm(10) : error A2008:syntax error : . helloworld.asm(11) : error A2008:syntax error : . helloworld.asm(12) : error A2008:syntax error : .type helloworld.asm(13) : error A2008:syntax error : . helloworld.asm(14) : error A2044:invalid character in file helloworld.asm(15) : error A2008:syntax error : . helloworld.asm(16) : error A2044:invalid character in file helloworld.asm(17) : error A2044:invalid character in file helloworld.asm(18) : error A2044:invalid character in file helloworld.asm(19) : error A2044:invalid character in file helloworld.asm(20) : error A2044:invalid character in file helloworld.asm(21) : error A2044:invalid character in file helloworld.asm(22) : error A2044:invalid character in file helloworld.asm(23) : error A2044:invalid character in file helloworld.asm(24) : error A2044:invalid character in file helloworld.asm(25) : error A2044:invalid character in file helloworld.asm(26) : error A2044:invalid character in file helloworld.asm(27) : error A2044:invalid character in file helloworld.asm(28) : error A2044:invalid character in file helloworld.asm(29) : error A2044:invalid character in file helloworld.asm(30) : error A2044:invalid character in file helloworld.asm(31) : error A2044:invalid character in file helloworld.asm(32) : error A2044:invalid character in file helloworld.asm(33) : error A2044:invalid character in file helloworld.asm(34) : error A2044:invalid character in file helloworld.asm(35) : error A2044:invalid character in file helloworld.asm(36) : error A2044:invalid character in file helloworld.asm(37) : error A2044:invalid character in file helloworld.asm(38) : error A2044:invalid character in file helloworld.asm(39) : error A2044:invalid character in file helloworld.asm(40) : error A2044:invalid character in file helloworld.asm(41) : error A2044:invalid character in file helloworld.asm(42) : error A2044:invalid character in file helloworld.asm(43) : error A2044:invalid character in file helloworld.asm(44) : error A2044:invalid character in file helloworld.asm(45) : error A2044:invalid character in file helloworld.asm(46) : error A2044:invalid character in file helloworld.asm(47) : error A2044:invalid character in file helloworld.asm(48) : error A2044:invalid character in file helloworld.asm(49) : error A2044:invalid character in file helloworld.asm(50) : error A2044:invalid character in file helloworld.asm(51) : error A2044:invalid character in file helloworld.asm(52) : error A2044:invalid character in file helloworld.asm(53) : error A2044:invalid character in file helloworld.asm(54) : error A2044:invalid character in file helloworld.asm(55) : error A2044:invalid character in file helloworld.asm(56) : error A2044:invalid character in file helloworld.asm(57) : error A2044:invalid character in file helloworld.asm(58) : error A2044:invalid character in file helloworld.asm(59) : error A2044:invalid character in file helloworld.asm(60) : error A2044:invalid character in file helloworld.asm(61) : error A2044:invalid character in file helloworld.asm(62) : error A2044:invalid character in file helloworld.asm(63) : error A2044:invalid character in file helloworld.asm(64) : error A2044:invalid character in file helloworld.asm(65) : error A2044:invalid character in file helloworld.asm(66) : error A2044:invalid character in file helloworld.asm(67) : error A2044:invalid character in file helloworld.asm(68) : error A2044:invalid character in file helloworld.asm(69) : error A2044:invalid character in file helloworld.asm(70) : error A2044:invalid character in file helloworld.asm(71) : error A2044:invalid character in file helloworld.asm(72) : error A2044:invalid character in file helloworld.asm(73) : error A2044:invalid character in file helloworld.asm(74) : error A2044:invalid character in file helloworld.asm(75) : error A2044:invalid character in file helloworld.asm(76) : error A2044:invalid character in file helloworld.asm(77) : error A2044:invalid character in file helloworld.asm(78) : error A2044:invalid character in file helloworld.asm(79) : error A2044:invalid character in file helloworld.asm(80) : error A2044:invalid character in file helloworld.asm(81) : error A2044:invalid character in file helloworld.asm(82) : error A2044:invalid character in file helloworld.asm(83) : error A2044:invalid character in file helloworld.asm(84) : error A2044:invalid character in file helloworld.asm(85) : error A2044:invalid character in file helloworld.asm(86) : error A2044:invalid character in file helloworld.asm(87) : error A2044:invalid character in file helloworld.asm(88) : error A2044:invalid character in file helloworld.asm(89) : error A2044:invalid character in file helloworld.asm(90) : error A2044:invalid character in file helloworld.asm(91) : error A2044:invalid character in file helloworld.asm(92) : error A2044:invalid character in file helloworld.asm(93) : error A2044:invalid character in file helloworld.asm(94) : error A2044:invalid character in file helloworld.asm(95) : error A2044:invalid character in file helloworld.asm(96) : error A2044:invalid character in file helloworld.asm(97) : error A2044:invalid character in file helloworld.asm(98) : error A2044:invalid character in file helloworld.asm(99) : error A2044:invalid character in file helloworld.asm(100) : error A2044:invalid character in file helloworld.asm(101) : fatal error A1012:error count exceeds 100; stopping assembly
created the helloworld.asm.
>clang-cl /clang:-masm=intel /FA helloworld.cpp
helloworld.cpp
c++ #include <iostream> #include <vector> #include <string> int main() { std::vector<std::string> msg{"Hello1", "C++", "World", "from", "VS Code", "and the C++ extension!"}; for (const std::string &word : msg) { std::cout << word << " "; } std::cout << std::endl; return 0; }
my env
- Windows 10 ver2004
- cpu: intel core i7
- Visual Studio 2019
- ML.exe 14.26.28806.0
- clang-cl.exe version 10.0.0 (installed from VisualStudio2019 installer)
please tell me how to solve it.