Module: OS::Linux::Libstdcxx Private
- Defined in:
- os/linux/libstdcxx.rb
Overview
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Helper functions for querying libstdc++
information.
Constant Summary collapse
- SOVERSION =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
6
- SONAME =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.let("libstdc++.so.#{SOVERSION}".freeze, String)
Class Method Summary collapse
- .below_ci_version? ⇒ Boolean private
- .system_path ⇒ Pathname? private
- .system_version ⇒ Version private
Class Method Details
.below_ci_version? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
14 15 16 |
# File 'os/linux/libstdcxx.rb', line 14 def self.below_ci_version? system_version < LINUX_LIBSTDCXX_CI_VERSION end |
.system_path ⇒ Pathname?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 32 33 |
# File 'os/linux/libstdcxx.rb', line 29 def self.system_path @system_path ||= T.let(nil, T.nilable(Pathname)) @system_path ||= find_library(OS::Linux::Ld.library_paths(brewed: false)) @system_path ||= find_library(OS::Linux::Ld.system_dirs(brewed: false)) end |
.system_version ⇒ Version
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
19 20 21 22 23 24 25 26 |
# File 'os/linux/libstdcxx.rb', line 19 def self.system_version @system_version ||= T.let(nil, T.nilable(Version)) @system_version ||= if (path = system_path) Version.new("#{SOVERSION}#{path.realpath.basename.to_s.delete_prefix!(SONAME)}") else Version::NULL end end |