Announcement

Collapse
No announcement yet.

Clang-Cl Tries To Imitate Visual Studio's Compiler

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clang-Cl Tries To Imitate Visual Studio's Compiler

    Phoronix: Clang-Cl Tries To Imitate Visual Studio's Compiler

    Clang-Cl is one of the new driver modes to the Clang C/C++ front-end compiler to LLVM and its designed to imitate Visual Studio's cl.exe compiler...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Will this be able to build MSVC style inline assembly?

    Comment


    • #3
      Originally posted by mrugiero View Post
      Will this be able to build MSVC style inline assembly?
      Huh?
      As far as I know, VC >= 2K5 no longer supports in-line assembly in any form - forcing you to use .asm files instead.

      - Gilboa
      oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
      oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
      oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
      Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

      Comment


      • #4
        Originally posted by gilboa View Post
        Huh?
        As far as I know, VC >= 2K5 no longer supports in-line assembly in any form - forcing you to use .asm files instead.

        - Gilboa
        I don't really know, as MSVC isn't my main IDE at all. I just want to be able to build a project that uses it without having to reboot to Windows, to add some modifications. As GCC is unable to build this kind of assembly, cross compiling with MinGW fails.

        Comment


        • #5
          Same question but with Visual Studio's built-in support for OLE/COM inside C++

          (just "import" something and you get access to the object as a regular C++ class, without needing to fumble around with implement compiler, etc.)

          I ended up using DispHelper back then, but I was curious if these days a solution more closely similar to Visual C++ exists.

          Comment


          • #6
            This only implements command line arguments used by cl.exe. Nothing more.

            Comment


            • #7
              Originally posted by mrugiero View Post
              I don't really know, as MSVC isn't my main IDE at all. I just want to be able to build a project that uses it without having to reboot to Windows, to add some modifications. As GCC is unable to build this kind of assembly, cross compiling with MinGW fails.
              GCC does support inline assembly, it just uses a different type of inline assembly. E.g.

              In GCC:

              __asm__ volatile
              (
              "incq %0 ;"
              : "=m" (*value)
              :
              );

              In old(er) version of MSVC:

              __asm
              {
              mov eax, dword ptr [value]
              inc dword ptr [eax]
              }

              As I said, Microsoft dropped support for inline assembly in newer versions of VC.

              - Gilboa
              oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
              oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
              oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
              Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

              Comment


              • #8
                Originally posted by gilboa View Post
                GCC does support inline assembly, it just uses a different type of inline assembly.
                I'm fully aware, that's why I asked for "MSVC style inline assembly".

                Comment


                • #9
                  Originally posted by mrugiero View Post
                  I'm fully aware, that's why I asked for "MSVC style inline assembly".
                  Sorry. My mistake, didn't notice it.
                  oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
                  oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
                  oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
                  Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

                  Comment


                  • #10
                    Originally posted by gilboa View Post
                    Sorry. My mistake, didn't notice it.
                    No prob. Anyway, if you say the new versions of MSVC doesn't support it, I might be able to convince the rest of the crew working on that program (who uses MSVC) to put assembly calls in .s or .asm files, and then I can use a trick I've read about to include it as inline in GCC.

                    Comment

                    Working...
                    X