Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-346

Provide a more dynamic way of handling the availability of languages in GCC-family compilers

    XMLWordPrintable

Details

    Description

      Currently, C, C++, Objective-C and Objective-C++ are all handled by the "cpp" module.

      We assume that all of these languages are available by default. This assumption can break given that GCC may have been compiled with different --enable-languages options.

      We need to provide a way for the user to determine which language(s) are available from a given "ccommon" toolchain like GCC or Clang, and be able to act accordingly.

      Use case: your library has an Objective-C API and you'd like this to be compiled IF Objective-C support is available from the underlying toolchain. While this can effectively be assumed true for OS X, the same is not true for other platforms.

      Perhaps we could create a ccommon module, from which c, cpp, objc and objcpp modules inherit from, then use the not-yet-implemented 'required' property of Depends. required=false and language isn't available? Files don't get tagged and compiled. required=true and language isn't available? Nice friendly error message "C/C++/Objective-C/Objective-C++ is not supported by the current toolchain".

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes