cc_precompiler

A precompiler module for elixir_make

APACHE-2.0 License

Downloads
750.6K
Stars
7
Committers
2
cc_precompiler - v0.1.10 Latest Release

Published by cocoa-xu 8 months ago

Changelog

v0.1.10 (2024-03-10)

  • allow {:elixir_make, "~> 0.7 or ~> 0.8"}
cc_precompiler - v0.1.8

Published by cocoa-xu over 1 year ago

Changelog

v0.1.8 (2023-07-19)

Changed

Fixed CCPrecompiler.all_supported_targets(:fetch). It should fetch and merge default available compilers when include_default_ones is true.

cc_precompiler -

Published by cocoa-xu over 1 year ago

Changelog

v0.1.7 (2022-03-13)

Added

  • using :include_default_ones in project.cc_precompiler.compilers. Default (cross-)compiler will be included if it's true, otherwise only specified targets will be used.

Default value of :include_default_ones is false to avoid breaking changes.

If a custom target has the same name as a default one, then the custom one will override the default configuration for that target (e.g., the x86_64-linux-gnu entry below will override the default gcc configuration and use clang instead).

def project do
  [
    # ...
    cc_precompiler: [
      compilers: %{
        {:unix, :linux} => %{
          :include_default_ones => true,
          "my-custom-target" => {
            "my-custom-target-gcc",
            "my-custom-target-g++"
          },
          "x86_64-linux-gnu" => {
            "x86_64-linux-gnu-clang",
            "x86_64-linux-gnu-clang++"
          }
        }
      }
    ]
  ]
end
cc_precompiler - v0.1.6

Published by cocoa-xu over 1 year ago

v0.1.6 (2022-02-20)

Added

  • allow missing CC or CXX when detecting available targets by setting allow_missing_compiler to true.

    Adding this option because there is no need to require the presence of both CC and CXX for projects that only uses one of them.

    def project do
      [ 
      # ...
      cc_precompiler: [
          # optional config key
          #   true - the corresponding target will be available as long as we can detect either `CC` or `CXX`
          #   false  - both `CC` and `CXX` should be present on the system
          # defaults to `false`
          allow_missing_compiler: false,
          # ...
      ],
      # ...
      ]
    end
    

    For example, akash-akya/vix only uses gcc but they had to install g++ because of this requirement.

        - name: Install Dependencies
          run: |
            sudo apt-get update
            # we don't need g++ compiler but we `cc_precompiler` looks for
            # g++ executable to detect the target
            sudo apt-get install -y gcc make curl tar \
              gcc-aarch64-linux-gnu g++-aarch64-linux-gnu