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

Add a platform rule to simplify toolchain selection logic #2219

Closed
katre opened this issue Dec 9, 2016 · 4 comments
Closed

Add a platform rule to simplify toolchain selection logic #2219

katre opened this issue Dec 9, 2016 · 4 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-Configurability Issues for Configurability team type: feature request

Comments

@katre
Copy link
Member

katre commented Dec 9, 2016

Tracking issue for the work to add platforms and better toolchain selection to Bazel.

See the design document at https://docs.google.com/document/d/1-G-VPRLEj9VyfC6VrQBiR8To-dZjnBSQS66Y4nargGM/edit?ts=57df9619#heading=h.al54v2ddwqzv for more details.

@katre katre self-assigned this Dec 9, 2016
katre added a commit to katre/bazel that referenced this issue Feb 24, 2017
platform-related constraints and values.

Part of ongoing work on bazelbuild#2219.
katre added a commit to katre/bazel that referenced this issue Feb 24, 2017
platform-related constraints and values.

Part of ongoing work on bazelbuild#2219.

Change-Id: Ice370ee26469f4992faf72c0c95a1a3e51a9f9e7
katre added a commit to katre/bazel that referenced this issue Feb 24, 2017
values.

Part of ongoing work on bazelbuild#2219.

Change-Id: Ie4e842a5d8218e47f41a954c2b955ab24237aa65
katre added a commit to katre/bazel that referenced this issue Feb 24, 2017
values.

Part of ongoing work on bazelbuild#2219.

Change-Id: Ie4e842a5d8218e47f41a954c2b955ab24237aa65
katre added a commit to katre/bazel that referenced this issue Feb 24, 2017
values.

Part of ongoing work on bazelbuild#2219.

Change-Id: Ie4e842a5d8218e47f41a954c2b955ab24237aa65
bazel-io pushed a commit that referenced this issue Feb 28, 2017
platform-related constraints and values.

Part of ongoing work on #2219.

--
Change-Id: Ice370ee26469f4992faf72c0c95a1a3e51a9f9e7
Reviewed-on: https://cr.bazel.build/9091
PiperOrigin-RevId: 148758190
MOS_MIGRATED_REVID=148758190
katre added a commit to katre/bazel that referenced this issue Mar 1, 2017
values.

Part of ongoing work on bazelbuild#2219.

Change-Id: Ie4e842a5d8218e47f41a954c2b955ab24237aa65
bazel-io pushed a commit that referenced this issue Mar 2, 2017
…values.

Part of ongoing work on #2219.

--
Change-Id: Ie4e842a5d8218e47f41a954c2b955ab24237aa65
Reviewed-on: https://cr.bazel.build/9116
PiperOrigin-RevId: 148976893
MOS_MIGRATED_REVID=148976893
bazel-io pushed a commit that referenced this issue Mar 12, 2017
Part of #2219.

--
Change-Id: Id82bdd5b3dfab1d2ea781d27dd98020966ce8fac
Reviewed-on: https://cr.bazel.build/9271
PiperOrigin-RevId: 149782572
MOS_MIGRATED_REVID=149782572
bazel-io pushed a commit that referenced this issue Mar 23, 2017
…s//platforms.

Part of #2219.

--
Change-Id: I312c70e0c9064cbf4c4346a59bff04ada92e4890
Reviewed-on: https://cr.bazel.build/9412
PiperOrigin-RevId: 151016060
MOS_MIGRATED_REVID=151016060
@katre
Copy link
Member Author

katre commented Apr 20, 2017

I've gotten bad about tagging this issue in commits, so mentioning them here for tracking:

34efd79 Rename ToolchainLookup rule to ToolchainType, to better explain the usage of the rule.
be5f25c Rename the ToolchainProvider to a more accurate name (and free up the name for the new ToolchainProvider).
96580a4 Expose platform-related providers to Skylark.
edbeafe Adding toolchain provider and function to Skylark.
5dc81a2 Add toolchain_rule to enable rule authors to define toolchains.

katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: I87c7bc9fbfb38d3dbdf193b46247901d0f2a838d
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: Ia559d0770cbe82baca3f3259018a851a4cf30f22
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: I4d749dd9981fe33f75310acb0ec3927cff6f28fe
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: Ifd8aacef04bfbe2aa25eec7551803dc6e6a59ce5
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Experimental, DO NOT SUBMIT.

Change-Id: I101bb9fbaab0debb20b9bc07fca3b0dc4b9ff66b
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: I87c7bc9fbfb38d3dbdf193b46247901d0f2a838d
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: Ia559d0770cbe82baca3f3259018a851a4cf30f22
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: I4d749dd9981fe33f75310acb0ec3927cff6f28fe
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Added Functions: TKTKTK

Part of bazelbuild#2219.

Change-Id: Iba9e2d3e2171af3bc8b93df72d76c95ab2a26f0c
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Change-Id: Ifd8aacef04bfbe2aa25eec7551803dc6e6a59ce5
katre added a commit to katre/bazel that referenced this issue Apr 28, 2017
Part of bazelbuild#2219.

Experimental, DO NOT SUBMIT.

Change-Id: I101bb9fbaab0debb20b9bc07fca3b0dc4b9ff66b
katre added a commit to katre/bazel that referenced this issue May 1, 2017
…azel.

Part of bazelbuild#2219.

Change-Id: I76f3ebe88bd687c8b9ec47b91743a1cb724ec16f
katre added a commit to katre/bazel that referenced this issue May 1, 2017
Part of bazelbuild#2219.

Change-Id: I339009c13639144ca756eb07c520df7d430a64e3
katre added a commit to katre/bazel that referenced this issue May 1, 2017
Part of bazelbuild#2219.

Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71
bazel-io pushed a commit that referenced this issue May 2, 2017
Part of #2219.

Change-Id: I87c7bc9fbfb38d3dbdf193b46247901d0f2a838d
PiperOrigin-RevId: 154719063
katre added a commit to katre/bazel that referenced this issue Jul 6, 2017
Part of bazelbuild#2219.

Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71
bazel-io pushed a commit that referenced this issue Jul 7, 2017
Part of #2219.

Change-Id: Ia0effac6e6c362c04c6501b21dde89e9e5b154a4
PiperOrigin-RevId: 161216492
katre added a commit to katre/bazel that referenced this issue Jul 10, 2017
…lchains to use.

Part of bazelbuild#2219.

Change-Id: Id6dfe6ec102f609bb19461242a098bf977be29ae
katre added a commit to katre/bazel that referenced this issue Jul 10, 2017
Part of bazelbuild#2219.

Change-Id: I7293fd13bd8e0931f92afd051e18a9e7ce63762d
katre added a commit to katre/bazel that referenced this issue Jul 10, 2017
Part of bazelbuild#2219.

Change-Id: I339009c13639144ca756eb07c520df7d430a64e3
katre added a commit to katre/bazel that referenced this issue Jul 10, 2017
Part of bazelbuild#2219.

Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d
katre added a commit to katre/bazel that referenced this issue Jul 10, 2017
Part of bazelbuild#2219.

Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71
bazel-io pushed a commit that referenced this issue Jul 11, 2017
…lchains to use.

Part of #2219.

Change-Id: Id6dfe6ec102f609bb19461242a098bf977be29ae
PiperOrigin-RevId: 161527986
katre added a commit to katre/bazel that referenced this issue Jul 11, 2017
Part of bazelbuild#2219.

Change-Id: I7293fd13bd8e0931f92afd051e18a9e7ce63762d
katre added a commit to katre/bazel that referenced this issue Jul 11, 2017
Part of bazelbuild#2219.

Change-Id: I339009c13639144ca756eb07c520df7d430a64e3
katre added a commit to katre/bazel that referenced this issue Jul 11, 2017
Part of bazelbuild#2219.

Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d
katre added a commit to katre/bazel that referenced this issue Jul 11, 2017
Part of bazelbuild#2219.

Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71
bazel-io pushed a commit that referenced this issue Jul 13, 2017
Part of #2219.

Change-Id: I7293fd13bd8e0931f92afd051e18a9e7ce63762d
PiperOrigin-RevId: 161721445
katre added a commit to katre/bazel that referenced this issue Jul 13, 2017
Part of bazelbuild#2219.

Change-Id: I339009c13639144ca756eb07c520df7d430a64e3
katre added a commit to katre/bazel that referenced this issue Jul 13, 2017
Part of bazelbuild#2219.

Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d
katre added a commit to katre/bazel that referenced this issue Jul 13, 2017
Part of bazelbuild#2219.

Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71
katre added a commit to katre/bazel that referenced this issue Jul 13, 2017
Part of bazelbuild#2219.

Change-Id: I4b6358742e614f3f447abf0dabf3c9344a64a236
bazel-io pushed a commit that referenced this issue Jul 14, 2017
Part of #2219.

Change-Id: I339009c13639144ca756eb07c520df7d430a64e3
PiperOrigin-RevId: 161826487
@jmhodges
Copy link
Contributor

jmhodges commented Jul 15, 2017

Thank you for writing this up!

I was wondering about a possible use case.

The Go race detector is turned on when -race is passed to the Go compiler and linker to the Go target you're running and all of its dependencies. This turns out to be fairly difficult to get right, and is pretty clearly a fit for the platforms. That's not my use case but set up for it.

It would be nice if we didn't have to create new targets that flipped on the Go race detector on for itself and its deps, but instead could just pass in a CLI flag that chose the platform with the race detector flag set on its compiler and linker.

Is that a feature that will exist?

@jmhodges
Copy link
Contributor

jmhodges commented Jul 15, 2017

Oh, jeez, right on the next page is the answer laid out in the tensorflow example: yes.

Thanks again for writing all this down. Very helpful while I consider what to do about bazelbuild/rules_go#167

bazel-io pushed a commit that referenced this issue Jul 19, 2017
Part of #2219.

Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d
PiperOrigin-RevId: 162359389
bazel-io pushed a commit that referenced this issue Jul 21, 2017
Part of #2219.

Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71
PiperOrigin-RevId: 162634398
@katre
Copy link
Member Author

katre commented Feb 15, 2018

The platform rules exist, and work is continuing in #4442 , so closing this issue.

@katre katre closed this as completed Feb 15, 2018
@aiuto aiuto added team-Configurability Issues for Configurability team and removed team-Configurability Issues for Configurability team z-category: extensibility > configurability labels Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-Configurability Issues for Configurability team type: feature request
Projects
None yet
Development

No branches or pull requests

3 participants