Giter Site home page Giter Site logo

apple_support's People

Contributors

allevato avatar balestrapatrick avatar brentleyjones avatar cgrindel avatar comius avatar dflems avatar dslomov avatar erikkerber avatar fmeum avatar fweikert avatar github-actions[bot] avatar illicitonion avatar kaylathar avatar keith avatar kersson avatar nglevin avatar sergiocampama avatar stravinskii avatar thii avatar thomasvl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apple_support's Issues

apple_support.run doesn't seem to work when executable is a FilesToRunProvider

I'm still pretty new to bazel, so sorry if I'm doing something weird! I'm trying to get bazel_clang_tidy working, but patching it to connect it to our copy of LLVM. AIUI, it uses an aspect to generate additional actions for each cc rule. This is almost working, but I started getting errors because the sysroot contained __BAZEL_XCODE_SDKROOT__, which I think was being added due to our use of rules_xcodeproj.

I've modified the invocation of ctx.actions.run here to call apple_support.run instead, and injected the "apple" fragment and appropriate attrs too.

But now I'm seeing bazel file with the following error (truncated):

exec: com.google.devtools.build.lib.analysis.FilesToRunProvider@680cb74e: not found

It looks like this may be because apple_support.run doesn't expect the executable to be a FilesToRunProvider.

Is there a good workaround for this, or am I holding it wrong? :-)

Precompile toolchain binaries to avoid issues

Sometimes compiling the toolchain binaries causes timeouts on slower CI machines. One way we could avoid this is by vendoring the binaries for the few files we need instead of causing them to be compiled on the fly. This would also solve hermeticity issues with them

bazelbuild/bazel#17437

Getting rid of apple_cc_toolchain

We would like to get rid of apple_cc_toolchain. There has been recent efforts to refector it so that it is more like cc_toolchain, to the point where I believe the only remaining difference is the three crosstool variables used by cc_toolchain_config to set these environment variables: XCODE_VERSION_OVERRIDE, APPLE_SDK_VERSION_OVERRIDE, APPLE_SDK_PLATFORM. This information is readily available in xcode_config, which is already a dependency of cc_toolchain_config, so I believe it should be straightforward to migrate the bazel apple cc toolchain to that.

Once that is done, we should be able to replace all instances of apple_cc_toolchain with cc_toolchain.

This change also removes the use on APPLE_SDK_VERSION_OVERRIDE, so that can eventually be dropped also.

CC toolchain error occurs when building on linux with targets that are only compatible with MacOS

Reproduction

The following error occurs on linux if a target is marked as only being compatible with MacOS and the targets that depend on that target are not marked as such.

ERROR: /home/chuck/.cache/bazel/_bazel_chuck/1356082df8f6e9e7706552f3fc65582d/external/bazel_tools/tools/cpp/BUILD:58:19: in cc_toolchain_alias rule @bazel_tools//tools/cpp:current_cc_toolchain: 
Traceback (most recent call last):
        File "/virtual_builtins_bzl/common/cc/cc_toolchain_alias.bzl", line 26, column 48, in _impl
        File "/virtual_builtins_bzl/common/cc/cc_helper.bzl", line 219, column 17, in _find_cpp_toolchain
Error in fail: Unable to find a CC toolchain using toolchain resolution. Target: @@bazel_tools//tools/cpp:current_cc_toolchain, Platform: @@apple_support~1.11.1//platforms:darwin_x86_64, Exec platform: @@loca
l_config_platform//:host
ERROR: /home/chuck/.cache/bazel/_bazel_chuck/1356082df8f6e9e7706552f3fc65582d/external/bazel_tools/tools/cpp/BUILD:58:19: Analysis of target '@bazel_tools//tools/cpp:current_cc_toolchain' failed
ERROR: Analysis of target '//Sources/PrintObjcVersion:PrintObjcVersion' failed; build aborted: Analysis failed

Does not work with Bazel 2.1

Error:

$ bazel test :all


Traceback (most recent call last):
	File "/.../external/build_bazel_rules_apple/tools/realpath/BUILD", line 9
		_apple_genrule_inner(name = 'realpath_genrule')
	File "/.../external/build_bazel_apple_support/rules/apple_genrule.bzl", line 78, in _apple_genrule_impl
		apple_support.run_shell(ctx, <8 more arguments>)
	File "/.../external/build_bazel_apple_support/lib/apple_support.bzl", line 326, in apple_support.run_shell
		ctx.actions.run_shell(<1 more arguments>)
'command' must be of type string. passing a sequence of strings as 'command' is deprecated. To temporarily disable this check, set --incompatible_objc_framework_cleanup=false.

However, --incompatible_objc_framework_cleanup=false doesn't exist:

$ bazel test --noincompatible_objc_framework_cleanup :all
ERROR: Unrecognized option: --noincompatible_objc_framework_cleanup

It was removed here.

Here's the code with the error.

Provide a mechanism to disable `-dead_strip` in builds

I've recently come across a failure to build gazelle that was ultimately traced down to commit a000b23. I'm not a strong enough C++ developer to understand why that's happening, but I noticed that the commit message for this stated that:

This should be the right default for everyone, if not we can look at adding a way to disable it.

Having a flag to disable this feature would be most helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.