[all-commits] [llvm/llvm-project] d11b9f: [clang][macho] Add support for -darwin-target-vari...

Daniel Rodríguez Troitiño via All-commits all-commits at lists.llvm.org
Fri Oct 14 14:35:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d11b9fa3bfb9e2bedec142816e88b9171c8ec6b6
      https://github.com/llvm/llvm-project/commit/d11b9fa3bfb9e2bedec142816e88b9171c8ec6b6
  Author: Daniel Rodríguez Troitiño <danielrodriguez at fb.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
    M clang/include/clang/Driver/ToolChain.h
    M clang/lib/Driver/ToolChain.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/lib/Driver/ToolChains/Darwin.h
    A clang/test/Driver/clang-cc1as-target-variant.s
    A clang/test/Misc/cc1as-darwin-target-variant-sdk-version.s
    M clang/tools/driver/cc1as_main.cpp

  Log Message:
  -----------
  [clang][macho] Add support for -darwin-target-variant-sdk-version in cc1as

D121868 provided support for -darwin-target-variant-triple, but the
support for -darwin-target-variant-sdk-version was still missing for
cc1as. These changes build upon the previous and provides such support.

- Extracted the common code to handle -darwin-target-variant-triple and
  -darwin-target-variant-sdk-version in the Darwin toolchain to a method
  that can be used for both the cc1 and the cc1as job construction.
  cc1as does not support some of the parameters that were provided to
  cc1, so the same code cannot be used for both.
- Invoke that new common code when constructing a cc1as invocation.
- Parse the new -darwin-target-variant-sdk-version in the cc1as driver.
  Apply its value to the MCObjectFileInfo to generate the right values
  in the object files.
- Includes two new tests that check that cc1as uses the provided values
  in -darwin-target-variant-sdk and that the Clang driver creates the
  jobs with the correct arguments.

Differential Revision: https://reviews.llvm.org/D135729




More information about the All-commits mailing list