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

Power support #2139

Closed
wants to merge 14 commits into from
Closed

Power support #2139

wants to merge 14 commits into from

Conversation

npanpaliya
Copy link

No description provided.

@bazel-io
Copy link
Member

Can one of the admins verify this patch?

Copy link
Contributor

@damienmg damienmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase, we did several change to get rid of the need for protoc compiler. It should run out of the box if you use the distribution artifact.

if [ "${PLATFORM-}" = "darwin" ]; then
echo "Skipping test: linaro toolchain is not supported on darwin host."
if [ "${PLATFORM-}" = "darwin" -o "${MACHINE_TYPE}" = "ppc64le" ]; then
echo "Skipping test: linaro toolchain is not supported on darwin host or ppc64le Linux."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change that test to check that platform is linux instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebase, the test case started giving timeout error, even with checking linux instead of ppc64le or without any change i.e. just checking darwin. Is this a known problem? If it is, I'll undo this change and keep that original change of darwin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our CI test is green so there is no issue. If the test is timing out on supported platform it might be because the platform is overloaded while running the test.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, so should I change ppc64le check to "linux"? I've made that change but haven't committed it as the test was giving timeout. If it is green in your CI, I'll commit that change as you've suggested.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I mean this test is made to work only on Linux x86_64 so it's better to test that we are in the good architecture rather than list all the platform it cannot work on.

@damienmg
Copy link
Contributor

damienmg commented Dec 5, 2016

We will test this change after rebase.

@damienmg
Copy link
Contributor

Jenkins test this please

@npanpaliya
Copy link
Author

npanpaliya commented Dec 16, 2016

@damienmg Incorporated the requested change. Please review and let me know if any changes are required.

@@ -258,7 +258,7 @@ public void build() throws InterruptedException {
outputJar, javaStartClass, deployManifestLines, buildInfoArtifacts, classpathResources,
runtimeClasspath, includeBuildData, compression, launcher);

List<String> jvmArgs = ImmutableList.of("-client", SINGLEJAR_MAX_MEMORY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @philwo: why do we still have -client flag on Java on some machine, is there case it would be needed?

@damienmg
Copy link
Contributor

I just have one nit left and pinged another developer to get a precision to know if it is safe to remove "-client"

@damienmg
Copy link
Contributor

LGTM, I am merging it, if Klaus has no further objection the patch will be merged (Klaus away today so it will not be merged before monday).

A last test from jenkins too: test this please.

Thank you very much for your contribution and my apologies for the initial delay.

@npanpaliya
Copy link
Author

@damienmg Thank you very much for your review and approval.

@@ -19,7 +19,7 @@
* Various useful diagnostics functions from Linux err.h file, wrapped
* for portability.
*/
#if defined(__APPLE__) || defined(__linux)
#if defined(__APPLE__) || defined(__linux__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this change related to supporting power? Also, are we sure the case defined(__linux) was wrong in the first place and is not needed any more?

Copy link
Author

@npanpaliya npanpaliya Dec 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Power, when we compile a program using -std=c++11, then __linux gets undefined, which otherwise is defined. However, on x86, -std=c++11 does not make any difference. I verified on x86 too, and defined(linux) is defined there as well.
On Power:

$ cpp -dM foo.c | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1
$ cpp -dM -std=c++11 foo.c | grep linux
#define __linux__ 1
#define __gnu_linux__ 1

On x86:

$ cpp -dM foo.cc | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1
#define linux 1
~$ cpp -dM -std=c++11 foo.cc | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking. LGTM.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@npanpaliya
Copy link
Author

Could somebody point me to what is wrong with the test being failing on darwin platform as per CI build? Ideally the test should be skipped on darwin platform.

fi

if [$expected_platform -eq 0]
if ![ "${PLATFORM-}" = "linux" && "${MACHINE_TYPE}" = "x86_64" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space between "!" and "["

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, my bad! Thanks for pointing it out!.

@damienmg
Copy link
Contributor

Jenkins test this please

@damienmg
Copy link
Contributor

Oops I should not have done that, the change is still missing

@npanpaliya
Copy link
Author

Thanks @damienmg. I've pushed that change.

@damienmg
Copy link
Contributor

Jenkins test this please

@bazel-io bazel-io closed this in aaee64e Dec 21, 2016
npanpaliya pushed a commit to ibmsoe/bazel that referenced this pull request Jan 10, 2017
Closes bazelbuild#2139.

--
Reviewed-on: bazelbuild#2139
PiperOrigin-RevId: 142570236
MOS_MIGRATED_REVID=142570236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants