{% set lversion = "12.0.1" %}
{% set version = "12.0.0" %}
{% set sha256 = "129cb25cd13677aad951ce5c2deb0fe4afc1e9d98950f53b51bdcfb5a73afa0e" %}

package:
  name: lld
  version: {{ version }}

source:
  url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ lversion.replace(".rc", "-rc") }}/llvm-project-{{ lversion.replace(".rc", "rc") }}.src.tar.xz
  sha256: {{ sha256 }}
  patches:
    - patches/0001-Set-LLVM-directories.patch
    - patches/0002-point-header-inclusion-in-lld-MachO-CMakeLists.txt-t.patch

build:
  number: 0
  skip: true  # [win and vc<14]

requirements:
  build:
    - cmake >=3.4.3
    - ninja    # [win]
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - make     # [not win]
  host:
    - llvmdev =={{ version }}
    - llvm
  run_constrained:
    - llvm =={{ version }}

test:
  commands:
    - ld.lld --version  # [linux]
    - lld-link /?  # [win]

about:
  home: http://llvm.org/
  license: NCSA
  license_file: lld/LICENSE.TXT
  summary: The LLVM Linker

extra:
  recipe-maintainers:
    - isuruf
    - katietz
