Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm-core] Conan v2 #22666

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipes/llvm-core/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from conan.errors import ConanInvalidConfiguration
from conan import ConanFile
from conan.tools.build import cross_building
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout

Check warning on line 4 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Unused CMakeDeps imported from conan.tools.cmake

Check warning on line 4 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Unused CMakeToolchain imported from conan.tools.cmake

Check warning on line 4 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Unused cmake_layout imported from conan.tools.cmake
from conan.tools.files import apply_conandata_patches, chdir, collect_libs, get, load, rename, replace_in_file, rm, rmdir, save
from conan.tools.scm import Version
from conans import CMake
from collections import defaultdict
import json
import re
Expand Down Expand Up @@ -113,25 +113,25 @@

def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions['BUILD_SHARED_LIBS'] = False

Check failure on line 116 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
cmake.definitions['CMAKE_SKIP_RPATH'] = True

Check failure on line 117 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
cmake.definitions['CMAKE_POSITION_INDEPENDENT_CODE'] = \

Check failure on line 118 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.options.get_safe('fPIC', default=False) or self.options.shared

if not self.options.shared:
cmake.definitions['DISABLE_LLVM_LINK_LLVM_DYLIB'] = True

Check failure on line 122 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
# cmake.definitions['LLVM_LINK_DYLIB'] = self.options.shared

cmake.definitions['LLVM_TARGET_ARCH'] = 'host'

Check failure on line 125 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
cmake.definitions['LLVM_TARGETS_TO_BUILD'] = self.options.targets

Check failure on line 126 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
cmake.definitions['LLVM_BUILD_LLVM_DYLIB'] = self.options.shared

Check failure on line 127 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
cmake.definitions['LLVM_DYLIB_COMPONENTS'] = self.options.components

Check failure on line 128 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
cmake.definitions['LLVM_ENABLE_PIC'] = \

Check failure on line 129 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.options.get_safe('fPIC', default=False)

if self.settings.compiler == 'Visual Studio':
build_type = str(self.settings.build_type).upper()
cmake.definitions['LLVM_USE_CRT_{}'.format(build_type)] = \

Check failure on line 134 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Instance of 'CMake' has no 'definitions' member. Please, check https://github.com/conan-io/conan-center-index/blob/master/docs/v2_linter.md
self.settings.compiler.runtime

cmake.definitions['LLVM_ABI_BREAKING_CHECKS'] = 'WITH_ASSERTS'
Expand Down Expand Up @@ -298,7 +298,7 @@
elif dep.startswith('-delayload:'):
continue
elif dep.startswith('LLVM'):
components[dep]

Check warning on line 301 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Statement seems to have no effect
elif dep in cmake_targets:
dep = cmake_targets[dep]
elif os.path.exists(dep):
Expand Down Expand Up @@ -358,7 +358,7 @@
components['LLVMSupport'].append('z')
components_path = \
os.path.join(self.package_folder, 'lib', 'components.json')
with open(components_path, 'w') as components_file:

Check warning on line 361 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Using open without explicitly specifying an encoding
json.dump(components, components_file, indent=4)
else:
suffixes = ['.dylib', '.so']
Expand All @@ -379,7 +379,7 @@

components_path = \
os.path.join(self.package_folder, 'lib', 'components.json')
with open(components_path, 'r') as components_file:

Check warning on line 382 in recipes/llvm-core/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Using open without explicitly specifying an encoding
components = json.load(components_file)

dependencies = ['ffi', 'z', 'iconv', 'xml2']
Expand Down
Loading